Merge branch 'for-linus' into work.lookups
This commit is contained in:
20
fs/namei.c
20
fs/namei.c
@@ -2946,22 +2946,10 @@ no_open:
|
||||
dentry = lookup_real(dir, dentry, nd->flags);
|
||||
if (IS_ERR(dentry))
|
||||
return PTR_ERR(dentry);
|
||||
|
||||
if (create_error) {
|
||||
int open_flag = op->open_flag;
|
||||
|
||||
error = create_error;
|
||||
if ((open_flag & O_EXCL)) {
|
||||
if (!dentry->d_inode)
|
||||
goto out;
|
||||
} else if (!dentry->d_inode) {
|
||||
goto out;
|
||||
} else if ((open_flag & O_TRUNC) &&
|
||||
d_is_reg(dentry)) {
|
||||
goto out;
|
||||
}
|
||||
/* will fail later, go on to get the right error */
|
||||
}
|
||||
}
|
||||
if (create_error && !dentry->d_inode) {
|
||||
error = create_error;
|
||||
goto out;
|
||||
}
|
||||
looked_up:
|
||||
path->dentry = dentry;
|
||||
|
Reference in New Issue
Block a user