diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2009-12-24 06:49:47 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-03-05 09:01:25 -0500 |
commit | 9a66179e13504c676f891908a1e94912ec5cdefb (patch) | |
tree | ddfa9f767ba393744adc6714a4c7ef0966222d81 /fs/namei.c | |
parent | a2c36b450ee68470836cb858c58a6ba3a52c5ec5 (diff) |
Don't pass mangled open_flag to finish_open()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/namei.c b/fs/namei.c index 52517e0bbdde..5b9016006913 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -1591,13 +1591,13 @@ static int open_will_truncate(int flag, struct inode *inode) | |||
1591 | } | 1591 | } |
1592 | 1592 | ||
1593 | static struct file *finish_open(struct nameidata *nd, | 1593 | static struct file *finish_open(struct nameidata *nd, |
1594 | int open_flag, int flag, int acc_mode) | 1594 | int open_flag, int acc_mode) |
1595 | { | 1595 | { |
1596 | struct file *filp; | 1596 | struct file *filp; |
1597 | int will_truncate; | 1597 | int will_truncate; |
1598 | int error; | 1598 | int error; |
1599 | 1599 | ||
1600 | will_truncate = open_will_truncate(flag, nd->path.dentry->d_inode); | 1600 | will_truncate = open_will_truncate(open_flag, nd->path.dentry->d_inode); |
1601 | if (will_truncate) { | 1601 | if (will_truncate) { |
1602 | error = mnt_want_write(nd->path.mnt); | 1602 | error = mnt_want_write(nd->path.mnt); |
1603 | if (error) | 1603 | if (error) |
@@ -1733,7 +1733,7 @@ static struct file *do_last(struct nameidata *nd, struct path *path, | |||
1733 | error = -EISDIR; | 1733 | error = -EISDIR; |
1734 | if (S_ISDIR(path->dentry->d_inode->i_mode)) | 1734 | if (S_ISDIR(path->dentry->d_inode->i_mode)) |
1735 | goto exit; | 1735 | goto exit; |
1736 | filp = finish_open(nd, open_flag, flag, acc_mode); | 1736 | filp = finish_open(nd, open_flag, acc_mode); |
1737 | return filp; | 1737 | return filp; |
1738 | 1738 | ||
1739 | exit_mutex_unlock: | 1739 | exit_mutex_unlock: |
@@ -1854,7 +1854,7 @@ reval: | |||
1854 | return filp; | 1854 | return filp; |
1855 | 1855 | ||
1856 | ok: | 1856 | ok: |
1857 | filp = finish_open(&nd, open_flag, flag, acc_mode); | 1857 | filp = finish_open(&nd, open_flag, acc_mode); |
1858 | if (nd.root.mnt) | 1858 | if (nd.root.mnt) |
1859 | path_put(&nd.root); | 1859 | path_put(&nd.root); |
1860 | return filp; | 1860 | return filp; |