patch-2.4.10 linux/fs/nfsd/lockd.c

Next file: linux/fs/nfsd/nfs3proc.c
Previous file: linux/fs/nfsd/export.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.9/linux/fs/nfsd/lockd.c linux/fs/nfsd/lockd.c
@@ -32,8 +32,10 @@
 	fh.fh_export = NULL;
 
 	nfserr = nfsd_open(rqstp, &fh, S_IFREG, MAY_LOCK, filp);
-	if (!nfserr)
+	if (!nfserr) {
 		dget(filp->f_dentry);
+		mntget(filp->f_vfsmnt);
+	}
 	fh_put(&fh);
  	/* nlm and nfsd don't share error codes.
 	 * we invent: 0 = no error
@@ -55,6 +57,7 @@
 {
 	nfsd_close(filp);
 	dput(filp->f_dentry);
+	mntput(filp->f_vfsmnt);
 }
 
 struct nlmsvc_binding		nfsd_nlm_ops = {

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)