From: Erez Zadok NFSD forgets to call mnt_drop_write after a successful rename. Here's a fix. (Ah, the curse of a stackable file system developer: you have to debug everyone else's too. :-) One thing I wasn't sure is whether I could move the mnt_drop_write line a little above, just after the call to vfs_rename. If we can drop the ref earlier, it could improve scalability/performance just a bit, no? (i.e., what are the ramifications of holding on to this mnt writer ref longer than needed?) Signed-off-by: Erez Zadok Cc: Dave Hansen Cc: Christoph Hellwig Signed-off-by: Andrew Morton --- fs/nfsd/vfs.c | 1 + 1 file changed, 1 insertion(+) diff -puN fs/nfsd/vfs.c~nfsd-fix-wrong-mnt_writer-count-in-rename fs/nfsd/vfs.c --- a/fs/nfsd/vfs.c~nfsd-fix-wrong-mnt_writer-count-in-rename +++ a/fs/nfsd/vfs.c @@ -1688,6 +1688,7 @@ nfsd_rename(struct svc_rqst *rqstp, stru if (!host_err) host_err = nfsd_sync_dir(fdentry); } + mnt_drop_write(ffhp->fh_export->ex_path.mnt); out_dput_new: dput(ndentry); _