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

Next file: linux/fs/nfsd/nfs3xdr.c
Previous file: linux/fs/nfs/inode.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.46/linux/fs/nfsd/lockd.c linux/fs/nfsd/lockd.c
@@ -34,7 +34,16 @@
 	if (!nfserr)
 		dget(filp->f_dentry);
 	fh_put(&fh);
-	return nfserr;
+ 	/* nlm and nfsd don't share error codes.
+	 * we invent: 0 = no error
+	 *            1 = stale file handle
+	 *	      2 = other error
+	 */
+	if (nfserr == 0)
+		return 0;
+	else if (nfserr == nfserr_stale)
+		return 1;
+	else return 2;
 }
 
 static void

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