diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-20 12:53:27 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-20 12:53:27 -0700 |
commit | 1d9a8a47d659f053abeca9ece45651b4d94780c8 (patch) | |
tree | 5c61cba476fb073c8f6a250f6cda4b0a36628aea /fs/fuse/file.c | |
parent | f07767fd0f95c385108fa4c456a9cb216a424fec (diff) | |
parent | a7c1b990f71574e077b94ce4582e2cf11cb891fe (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
fuse: implement nonseekable open
fuse: add include protectors
fuse: config description improvement
fuse: add missing fuse_request_free
fuse: fix SEEK_END incorrectness
Diffstat (limited to 'fs/fuse/file.c')
-rw-r--r-- | fs/fuse/file.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 2bada6bbc31..34930a964b8 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -101,6 +101,8 @@ void fuse_finish_open(struct inode *inode, struct file *file, file->f_op = &fuse_direct_io_file_operations; if (!(outarg->open_flags & FOPEN_KEEP_CACHE)) invalidate_inode_pages2(inode->i_mapping); + if (outarg->open_flags & FOPEN_NONSEEKABLE) + nonseekable_open(inode, file); ff->fh = outarg->fh; file->private_data = fuse_file_get(ff); } @@ -1448,6 +1450,9 @@ static loff_t fuse_file_llseek(struct file *file, loff_t offset, int origin) mutex_lock(&inode->i_mutex); switch (origin) { case SEEK_END: + retval = fuse_update_attributes(inode, NULL, file, NULL); + if (retval) + return retval; offset += i_size_read(inode); break; case SEEK_CUR: |