patch-2.2.0-pre9 linux/fs/namei.c
Next file: linux/fs/proc/array.c
Previous file: linux/fs/Config.in
Back to the patch index
Back to the overall index
- Lines: 18
- Date:
Tue Jan 19 10:26:33 1999
- Orig file:
v2.2.0-pre8/linux/fs/namei.c
- Orig date:
Tue Jan 19 11:32:52 1999
diff -u --recursive --new-file v2.2.0-pre8/linux/fs/namei.c linux/fs/namei.c
@@ -882,8 +882,16 @@
if (IS_ERR(dentry))
goto exit;
+ /*
+ * EEXIST is kind of a strange error code to
+ * return, but basically if the dentry was moved
+ * or unlinked while we locked the parent, we
+ * do know that it _did_ exist before, and as
+ * such it makes perfect sense.. In contrast,
+ * ENOENT doesn't make sense for mkdir.
+ */
dir = lock_parent(dentry);
- error = -ENOENT;
+ error = -EEXIST;
if (!check_parent(dir, dentry))
goto exit_lock;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov