nfs_lookup(): remove debris left over from old sillyunlink exclusion
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
96b0cffbaf
commit
bf13091420
11
fs/nfs/dir.c
11
fs/nfs/dir.c
@ -1363,7 +1363,6 @@ EXPORT_SYMBOL_GPL(nfs_dentry_operations);
|
|||||||
struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, unsigned int flags)
|
struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, unsigned int flags)
|
||||||
{
|
{
|
||||||
struct dentry *res;
|
struct dentry *res;
|
||||||
struct dentry *parent;
|
|
||||||
struct inode *inode = NULL;
|
struct inode *inode = NULL;
|
||||||
struct nfs_fh *fhandle = NULL;
|
struct nfs_fh *fhandle = NULL;
|
||||||
struct nfs_fattr *fattr = NULL;
|
struct nfs_fattr *fattr = NULL;
|
||||||
@ -1393,20 +1392,18 @@ struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, unsigned in
|
|||||||
if (IS_ERR(label))
|
if (IS_ERR(label))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
parent = dentry->d_parent;
|
|
||||||
/* Protect against concurrent sillydeletes */
|
|
||||||
trace_nfs_lookup_enter(dir, dentry, flags);
|
trace_nfs_lookup_enter(dir, dentry, flags);
|
||||||
error = NFS_PROTO(dir)->lookup(dir, &dentry->d_name, fhandle, fattr, label);
|
error = NFS_PROTO(dir)->lookup(dir, &dentry->d_name, fhandle, fattr, label);
|
||||||
if (error == -ENOENT)
|
if (error == -ENOENT)
|
||||||
goto no_entry;
|
goto no_entry;
|
||||||
if (error < 0) {
|
if (error < 0) {
|
||||||
res = ERR_PTR(error);
|
res = ERR_PTR(error);
|
||||||
goto out_unblock_sillyrename;
|
goto out_label;
|
||||||
}
|
}
|
||||||
inode = nfs_fhget(dentry->d_sb, fhandle, fattr, label);
|
inode = nfs_fhget(dentry->d_sb, fhandle, fattr, label);
|
||||||
res = ERR_CAST(inode);
|
res = ERR_CAST(inode);
|
||||||
if (IS_ERR(res))
|
if (IS_ERR(res))
|
||||||
goto out_unblock_sillyrename;
|
goto out_label;
|
||||||
|
|
||||||
/* Success: notify readdir to use READDIRPLUS */
|
/* Success: notify readdir to use READDIRPLUS */
|
||||||
nfs_advise_use_readdirplus(dir);
|
nfs_advise_use_readdirplus(dir);
|
||||||
@ -1415,11 +1412,11 @@ no_entry:
|
|||||||
res = d_splice_alias(inode, dentry);
|
res = d_splice_alias(inode, dentry);
|
||||||
if (res != NULL) {
|
if (res != NULL) {
|
||||||
if (IS_ERR(res))
|
if (IS_ERR(res))
|
||||||
goto out_unblock_sillyrename;
|
goto out_label;
|
||||||
dentry = res;
|
dentry = res;
|
||||||
}
|
}
|
||||||
nfs_set_verifier(dentry, nfs_save_change_attribute(dir));
|
nfs_set_verifier(dentry, nfs_save_change_attribute(dir));
|
||||||
out_unblock_sillyrename:
|
out_label:
|
||||||
trace_nfs_lookup_exit(dir, dentry, flags, error);
|
trace_nfs_lookup_exit(dir, dentry, flags, error);
|
||||||
nfs4_label_free(label);
|
nfs4_label_free(label);
|
||||||
out:
|
out:
|
||||||
|
Loading…
Reference in New Issue
Block a user