From: NeilBrown Date: Wed, 4 Oct 2006 09:15:43 +0000 (-0700) Subject: [PATCH] knfsd: nfsd: lockdep annotation fix X-Git-Tag: upstream/snapshot3+hdmi~37202 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7ed94296a660a61989b5d54f0c4bb804f30567d3;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git [PATCH] knfsd: nfsd: lockdep annotation fix nfsv2 needs the I_MUTEX_PARENT on the directory when creating a file too. Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/nfsd/nfsproc.c b/fs/nfsd/nfsproc.c index 06cd0db..4e06810 100644 --- a/fs/nfsd/nfsproc.c +++ b/fs/nfsd/nfsproc.c @@ -225,7 +225,7 @@ nfsd_proc_create(struct svc_rqst *rqstp, struct nfsd_createargs *argp, nfserr = nfserr_exist; if (isdotent(argp->name, argp->len)) goto done; - fh_lock(dirfhp); + fh_lock_nested(dirfhp, I_MUTEX_PARENT); dchild = lookup_one_len(argp->name, dirfhp->fh_dentry, argp->len); if (IS_ERR(dchild)) { nfserr = nfserrno(PTR_ERR(dchild));