From 69ab3a70394a54a1a068009ab0398b7d5bc6ab41 Mon Sep 17 00:00:00 2001 From: Mark Fasheh Date: Wed, 18 Feb 2009 11:41:38 -0800 Subject: [PATCH] --- yaml --- r: 140300 b: refs/heads/master c: b80b549c3520b31d3bbc4b36e37e0a5102da0b94 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/ocfs2/namei.c | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index e786d74aa993..6809f2a7d957 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3a8df2b9c365a9f366b76bbbce479e1cc18ddc16 +refs/heads/master: b80b549c3520b31d3bbc4b36e37e0a5102da0b94 diff --git a/trunk/fs/ocfs2/namei.c b/trunk/fs/ocfs2/namei.c index 67113cfddc9b..58c318d2f061 100644 --- a/trunk/fs/ocfs2/namei.c +++ b/trunk/fs/ocfs2/namei.c @@ -834,10 +834,7 @@ static int ocfs2_unlink(struct inode *dir, child_locked = 1; if (S_ISDIR(inode->i_mode)) { - if (!ocfs2_empty_dir(inode)) { - status = -ENOTEMPTY; - goto leave; - } else if (inode->i_nlink != 2) { + if (inode->i_nlink != 2 || !ocfs2_empty_dir(inode)) { status = -ENOTEMPTY; goto leave; } @@ -1280,8 +1277,8 @@ static int ocfs2_rename(struct inode *old_dir, if (target_exists) { if (S_ISDIR(new_inode->i_mode)) { - if (!ocfs2_empty_dir(new_inode) || - new_inode->i_nlink != 2) { + if (new_inode->i_nlink != 2 || + !ocfs2_empty_dir(new_inode)) { status = -ENOTEMPTY; goto bail; }