From 78407338b104307ce5af3742e5d9161777b43263 Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Wed, 18 Nov 2009 06:38:16 -0500 Subject: [PATCH] cifs: don't send SMB_O_APPEND when file is opened with O_APPEND The meaning of SMB_O_APPEND is a bit nebulous... SMB writes are sent with a starting offset and length. When the file is opened with SMB_O_APPEND, does the offset mean the offset from the EOF or does it mean an absolute offset? CIFS assumes the latter, which means that the SMB_O_APPEND flag has no effect. Therefore, we shouldn't send it in the first place. Signed-off-by: Jeff Layton --- fs/cifs/dir.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c index 627a60a..6c1f02b 100644 --- a/fs/cifs/dir.c +++ b/fs/cifs/dir.c @@ -214,8 +214,6 @@ int cifs_posix_open(char *full_path, struct inode **pinode, posix_flags |= SMB_O_EXCL; if (oflags & O_TRUNC) posix_flags |= SMB_O_TRUNC; - if (oflags & O_APPEND) - posix_flags |= SMB_O_APPEND; if (oflags & O_SYNC) posix_flags |= SMB_O_SYNC; if (oflags & O_DIRECTORY) -- 1.5.5.6