patch-2.3.99-pre4 linux/fs/nfsd/export.c

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

diff -u --recursive --new-file v2.3.99-pre3/linux/fs/nfsd/export.c linux/fs/nfsd/export.c
@@ -246,14 +246,11 @@
 
 	/* Look up the dentry */
 	err = -EINVAL;
-	dentry = lookup_dentry(nxp->ex_path, NULL, 0);
+	dentry = lookup_dentry(nxp->ex_path, LOOKUP_POSITIVE);
 	if (IS_ERR(dentry))
 		goto out_unlock;
 
-	err = -ENOENT;
 	inode = dentry->d_inode;
-	if (!inode)
-		goto finish;
 	err = -EINVAL;
 	if (inode->i_dev != dev || inode->i_ino != nxp->ex_ino) {
 		printk(KERN_DEBUG "exp_export: i_dev = %x, dev = %x\n",
@@ -443,7 +440,7 @@
 
 	err = -EPERM;
 	if (path) {
-		if (!(dentry = lookup_dentry(path, NULL, 0))) {
+		if (!(dentry = lookup_dentry(path, 0))) {
 			printk("nfsd: exp_rootfh path not found %s", path);
 			return -EPERM;
 		}

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