From: NeilBrown <[email protected]> Rather than explicit locking, use the start_removing_noperm() and end_removing() wrappers. This was not done with other start_removing changes due to conflicting in-flight patches.
Reviewed-by: Jeff Layton <[email protected]> Signed-off-by: NeilBrown <[email protected]> --- fs/nfsd/nfs4recover.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c index b4bf85f96f6e..b338473d6e52 100644 --- a/fs/nfsd/nfs4recover.c +++ b/fs/nfsd/nfs4recover.c @@ -352,16 +352,14 @@ purge_old(struct dentry *parent, char *cname, struct nfsd_net *nn) if (nfs4_has_reclaimed_state(name, nn)) goto out_free; - inode_lock_nested(d_inode(parent), I_MUTEX_PARENT); - child = lookup_one(&nop_mnt_idmap, &QSTR(cname), parent); + child = start_removing_noperm(parent, &QSTR(cname)); if (!IS_ERR(child)) { status = vfs_rmdir(&nop_mnt_idmap, d_inode(parent), child, NULL); if (status) printk("failed to remove client recovery directory %pd\n", child); - dput(child); } - inode_unlock(d_inode(parent)); + end_removing(child); out_free: kfree(name.data); -- 2.50.0.107.gf914562f5916.dirty
