diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-11 18:31:13 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-11 18:31:13 -0500 |
commit | 3126c136bc30225d7a43af741778aa50e95e467a (patch) | |
tree | 71e6f0de6e1f4cde200dd632da4d2f61180289bf /fs/namei.c | |
parent | f4d544ee5720d336a8c64f9fd33efb888c302309 (diff) | |
parent | 8e0eb4011bd73d5f91b215b532f74eef478ef795 (diff) |
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6: (21 commits)
ext3: PTR_ERR return of wrong pointer in setup_new_group_blocks()
ext3: Fix data / filesystem corruption when write fails to copy data
ext4: Support for 64-bit quota format
ext3: Support for vfsv1 quota format
quota: Implement quota format with 64-bit space and inode limits
quota: Move definition of QFMT_OCFS2 to linux/quota.h
ext2: fix comment in ext2_find_entry about return values
ext3: Unify log messages in ext3
ext2: clear uptodate flag on super block I/O error
ext2: Unify log messages in ext2
ext3: make "norecovery" an alias for "noload"
ext3: Don't update the superblock in ext3_statfs()
ext3: journal all modifications in ext3_xattr_set_handle
ext2: Explicitly assign values to on-disk enum of filetypes
quota: Fix WARN_ON in lookup_one_len
const: struct quota_format_ops
ubifs: remove manual O_SYNC handling
afs: remove manual O_SYNC handling
kill wait_on_page_writeback_range
vfs: Implement proper O_SYNC semantics
...
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/namei.c b/fs/namei.c index d3c190c35fcc..87f97ba90ad1 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -1656,6 +1656,15 @@ struct file *do_filp_open(int dfd, const char *pathname, | |||
1656 | int will_write; | 1656 | int will_write; |
1657 | int flag = open_to_namei_flags(open_flag); | 1657 | int flag = open_to_namei_flags(open_flag); |
1658 | 1658 | ||
1659 | /* | ||
1660 | * O_SYNC is implemented as __O_SYNC|O_DSYNC. As many places only | ||
1661 | * check for O_DSYNC if the need any syncing at all we enforce it's | ||
1662 | * always set instead of having to deal with possibly weird behaviour | ||
1663 | * for malicious applications setting only __O_SYNC. | ||
1664 | */ | ||
1665 | if (open_flag & __O_SYNC) | ||
1666 | open_flag |= O_DSYNC; | ||
1667 | |||
1659 | if (!acc_mode) | 1668 | if (!acc_mode) |
1660 | acc_mode = MAY_OPEN | ACC_MODE(flag); | 1669 | acc_mode = MAY_OPEN | ACC_MODE(flag); |
1661 | 1670 | ||