diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-06-11 08:23:01 +0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-06-29 12:57:09 +0400 |
commit | f9652e10c12b43d9bb957269745cf2fa5682fa92 (patch) | |
tree | fd358891b9778f7bdd8764163aa2029d01efcf9c /fs/namei.c | |
parent | 50cd2c577668a170750b15f9a88f022f681ce3c7 (diff) | |
download | linux-f9652e10c12b43d9bb957269745cf2fa5682fa92.tar.bz2 |
allow build_open_flags() to return an error
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 1bc7b7582a66..402eda351d07 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -2969,9 +2969,10 @@ out: } struct file *do_filp_open(int dfd, struct filename *pathname, - const struct open_flags *op, int flags) + const struct open_flags *op) { struct nameidata nd; + int flags = op->lookup_flags; struct file *filp; filp = path_openat(dfd, pathname, &nd, op, flags | LOOKUP_RCU); @@ -2983,17 +2984,16 @@ struct file *do_filp_open(int dfd, struct filename *pathname, } struct file *do_file_open_root(struct dentry *dentry, struct vfsmount *mnt, - const char *name, const struct open_flags *op, int flags) + const char *name, const struct open_flags *op) { struct nameidata nd; struct file *file; struct filename filename = { .name = name }; + int flags = op->lookup_flags | LOOKUP_ROOT; nd.root.mnt = mnt; nd.root.dentry = dentry; - flags |= LOOKUP_ROOT; - if (dentry->d_inode->i_op->follow_link && op->intent & LOOKUP_OPEN) return ERR_PTR(-ELOOP); |