summaryrefslogtreecommitdiff
path: root/fs/cifs
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2009-12-11 10:45:16 +1100
committerStephen Rothwell <sfr@canb.auug.org.au>2009-12-11 10:45:16 +1100
commite7fed7cdc9c8f38951c0ce138bd7748b44d6f4e3 (patch)
tree59652425e7392d71fbf29f29907b6fba9476f156 /fs/cifs
parente0e33db19981719576fb5d7927e53d461966c578 (diff)
parent8e0eb4011bd73d5f91b215b532f74eef478ef795 (diff)
Merge remote branch 'ext3/for_next'
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/dir.c3
-rw-r--r--fs/cifs/file.c6
2 files changed, 6 insertions, 3 deletions
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
index 1f42f772865a..6ccf7262d1b7 100644
--- a/fs/cifs/dir.c
+++ b/fs/cifs/dir.c
@@ -214,7 +214,8 @@ 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_SYNC)
+ /* be safe and imply O_SYNC for O_DSYNC */
+ if (oflags & O_DSYNC)
posix_flags |= SMB_O_SYNC;
if (oflags & O_DIRECTORY)
posix_flags |= SMB_O_DIRECTORY;
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index 429337eb7afe..057e1dae12ab 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -76,8 +76,10 @@ static inline fmode_t cifs_posix_convert_flags(unsigned int flags)
reopening a file. They had their effect on the original open */
if (flags & O_APPEND)
posix_flags |= (fmode_t)O_APPEND;
- if (flags & O_SYNC)
- posix_flags |= (fmode_t)O_SYNC;
+ if (flags & O_DSYNC)
+ posix_flags |= (fmode_t)O_DSYNC;
+ if (flags & __O_SYNC)
+ posix_flags |= (fmode_t)__O_SYNC;
if (flags & O_DIRECTORY)
posix_flags |= (fmode_t)O_DIRECTORY;
if (flags & O_NOFOLLOW)