aboutsummaryrefslogtreecommitdiff
path: root/fs/ocfs2
diff options
context:
space:
mode:
authorJan Kara2008-10-20 19:23:54 +0200
committerMark Fasheh2008-11-10 09:51:46 -0800
commitb99835c1684918b9975851d71455c5c007d1715b (patch)
tree953ab209fa9c15a465ecf174a9327fb5d35c271a /fs/ocfs2
parent87cfa004321c62aec681713ea48e0b846336d9f4 (diff)
ocfs2: Let inode be really deleted when ocfs2_mknod_locked() fails
We forgot to set i_nlink to 0 when returning due to error from ocfs2_mknod_locked() and thus inode was not properly released via ocfs2_delete_inode() (e.g. claimed space was not released). Fix it. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r--fs/ocfs2/namei.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c
index f594f300d4cd..f4967e634ffd 100644
--- a/fs/ocfs2/namei.c
+++ b/fs/ocfs2/namei.c
@@ -491,8 +491,10 @@ leave:
brelse(*new_fe_bh);
*new_fe_bh = NULL;
}
- if (inode)
+ if (inode) {
+ clear_nlink(inode);
iput(inode);
+ }
}
mlog_exit(status);