From 1be0746d425407c926273de894c02b4128d6c038 Mon Sep 17 00:00:00 2001 From: Srinivas Eeda Date: Wed, 31 Oct 2007 16:49:43 -0700 Subject: [PATCH] --- yaml --- r: 73301 b: refs/heads/master c: e325a88f17196f18888f6e1426eb9fe3b4346d28 h: refs/heads/master i: 73299: b6536195591c0b8c2f06ade97043db9aaa451561 v: v3 --- [refs] | 2 +- trunk/fs/ocfs2/namei.c | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 2a188e58a0f4..7dce625f2b86 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: bc7e97cbdd4bef162e5772c74ee2cc4487a2d997 +refs/heads/master: e325a88f17196f18888f6e1426eb9fe3b4346d28 diff --git a/trunk/fs/ocfs2/namei.c b/trunk/fs/ocfs2/namei.c index 729259016c18..989ac2718587 100644 --- a/trunk/fs/ocfs2/namei.c +++ b/trunk/fs/ocfs2/namei.c @@ -1105,9 +1105,16 @@ static int ocfs2_rename(struct inode *old_dir, goto bail; } - if (!new_de && new_inode) - mlog(ML_ERROR, "inode %lu does not exist in it's parent " - "directory!", new_inode->i_ino); + if (!new_de && new_inode) { + /* + * Target was unlinked by another node while we were + * waiting to get to ocfs2_rename(). There isn't + * anything we can do here to help the situation, so + * bubble up the appropriate error. + */ + status = -ENOENT; + goto bail; + } /* In case we need to overwrite an existing file, we blow it * away first */