patch-2.2.7 linux/fs/namei.c

Next file: linux/fs/ncpfs/Config.in
Previous file: linux/fs/msdos/namei.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.6/linux/fs/namei.c linux/fs/namei.c
@@ -263,12 +263,11 @@
 		struct dentry * dentry = d_alloc(parent, name);
 		result = ERR_PTR(-ENOMEM);
 		if (dentry) {
-			int error = dir->i_op->lookup(dir, dentry);
-			result = dentry;
-			if (error) {
+			result = dir->i_op->lookup(dir, dentry);
+			if (result)
 				dput(dentry);
-				result = ERR_PTR(error);
-			}
+			else
+				result = dentry;
 		}
 	}
 	up(&dir->i_sem);

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