Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=889f784831d6cc9125a74eb55a5641f95635a204 Commit: 889f784831d6cc9125a74eb55a5641f95635a204 Parent: 492c8b332e3af279ffadf49b85967d5e43810923 Author: Miklos Szeredi <[EMAIL PROTECTED]> AuthorDate: Wed May 23 13:57:54 2007 -0700 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Wed May 23 20:14:13 2007 -0700
fuse: generic_write_checks() for direct_io This fixes O_APPEND in direct IO mode. Also checks writes against file size limits, notably rlimits. Reported by Greg Bruno. Signed-off-by: Miklos Szeredi <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- fs/fuse/file.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/fs/fuse/file.c b/fs/fuse/file.c index d0ed60b..adf7995 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -610,7 +610,9 @@ static ssize_t fuse_direct_write(struct file *file, const char __user *buf, ssize_t res; /* Don't allow parallel writes to the same file */ mutex_lock(&inode->i_mutex); - res = fuse_direct_io(file, buf, count, ppos, 1); + res = generic_write_checks(file, ppos, &count, 0); + if (!res) + res = fuse_direct_io(file, buf, count, ppos, 1); mutex_unlock(&inode->i_mutex); return res; } - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html