diff options
author | Jan Kara <jack@suse.cz> | 2008-10-20 13:23:54 -0400 |
---|---|---|
committer | Mark Fasheh <mfasheh@suse.com> | 2008-11-10 12:51:46 -0500 |
commit | b99835c1684918b9975851d71455c5c007d1715b (patch) | |
tree | 953ab209fa9c15a465ecf174a9327fb5d35c271a /fs/ocfs2 | |
parent | 87cfa004321c62aec681713ea48e0b846336d9f4 (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.c | 4 |
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: | |||
491 | brelse(*new_fe_bh); | 491 | brelse(*new_fe_bh); |
492 | *new_fe_bh = NULL; | 492 | *new_fe_bh = NULL; |
493 | } | 493 | } |
494 | if (inode) | 494 | if (inode) { |
495 | clear_nlink(inode); | ||
495 | iput(inode); | 496 | iput(inode); |
497 | } | ||
496 | } | 498 | } |
497 | 499 | ||
498 | mlog_exit(status); | 500 | mlog_exit(status); |