diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-06-11 04:58:01 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-06-11 04:58:01 -0400 |
commit | 4894e4aca82aca927d0404ce61f021f790de4b1e (patch) | |
tree | bbe0d083829f5858295298f188d885367cf4b1f6 /fs/namei.c | |
parent | 05e882f890038c702a4f15d385135d03cf74ad48 (diff) | |
parent | 07a2039b8eb0af4ff464efd3dfd95de5c02648c6 (diff) |
Merge commit 'v2.6.30' into next
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/namei.c b/fs/namei.c index 78f253cd2d4f..967c3db92724 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -1130,8 +1130,8 @@ int vfs_path_lookup(struct dentry *dentry, struct vfsmount *mnt, | |||
1130 | * @nd: pointer to nameidata | 1130 | * @nd: pointer to nameidata |
1131 | * @open_flags: open intent flags | 1131 | * @open_flags: open intent flags |
1132 | */ | 1132 | */ |
1133 | int path_lookup_open(int dfd, const char *name, unsigned int lookup_flags, | 1133 | static int path_lookup_open(int dfd, const char *name, |
1134 | struct nameidata *nd, int open_flags) | 1134 | unsigned int lookup_flags, struct nameidata *nd, int open_flags) |
1135 | { | 1135 | { |
1136 | struct file *filp = get_empty_filp(); | 1136 | struct file *filp = get_empty_filp(); |
1137 | int err; | 1137 | int err; |
@@ -1637,18 +1637,19 @@ static int open_will_write_to_fs(int flag, struct inode *inode) | |||
1637 | * open_to_namei_flags() for more details. | 1637 | * open_to_namei_flags() for more details. |
1638 | */ | 1638 | */ |
1639 | struct file *do_filp_open(int dfd, const char *pathname, | 1639 | struct file *do_filp_open(int dfd, const char *pathname, |
1640 | int open_flag, int mode) | 1640 | int open_flag, int mode, int acc_mode) |
1641 | { | 1641 | { |
1642 | struct file *filp; | 1642 | struct file *filp; |
1643 | struct nameidata nd; | 1643 | struct nameidata nd; |
1644 | int acc_mode, error; | 1644 | int error; |
1645 | struct path path; | 1645 | struct path path; |
1646 | struct dentry *dir; | 1646 | struct dentry *dir; |
1647 | int count = 0; | 1647 | int count = 0; |
1648 | int will_write; | 1648 | int will_write; |
1649 | int flag = open_to_namei_flags(open_flag); | 1649 | int flag = open_to_namei_flags(open_flag); |
1650 | 1650 | ||
1651 | acc_mode = MAY_OPEN | ACC_MODE(flag); | 1651 | if (!acc_mode) |
1652 | acc_mode = MAY_OPEN | ACC_MODE(flag); | ||
1652 | 1653 | ||
1653 | /* O_TRUNC implies we need access checks for write permissions */ | 1654 | /* O_TRUNC implies we need access checks for write permissions */ |
1654 | if (flag & O_TRUNC) | 1655 | if (flag & O_TRUNC) |
@@ -1869,7 +1870,7 @@ do_link: | |||
1869 | */ | 1870 | */ |
1870 | struct file *filp_open(const char *filename, int flags, int mode) | 1871 | struct file *filp_open(const char *filename, int flags, int mode) |
1871 | { | 1872 | { |
1872 | return do_filp_open(AT_FDCWD, filename, flags, mode); | 1873 | return do_filp_open(AT_FDCWD, filename, flags, mode, 0); |
1873 | } | 1874 | } |
1874 | EXPORT_SYMBOL(filp_open); | 1875 | EXPORT_SYMBOL(filp_open); |
1875 | 1876 | ||