From: NeilBrown nfsv2 needs the I_MUTEX_PARENT on the directory when creating a file too. Signed-off-by: Neil Brown Signed-off-by: Andrew Morton --- fs/nfsd/nfsproc.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN fs/nfsd/nfsproc.c~knfsd-nfsd-lockdep-annotation-fix fs/nfsd/nfsproc.c --- a/fs/nfsd/nfsproc.c~knfsd-nfsd-lockdep-annotation-fix +++ a/fs/nfsd/nfsproc.c @@ -225,7 +225,7 @@ nfsd_proc_create(struct svc_rqst *rqstp, 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)); _