Skip to content

Commit 716b457

Browse files
Zhihao Chengrichardweinberger
authored andcommitted
ubifs: Add missing iput if do_tmpfile() failed in rename whiteout
whiteout inode should be put when do_tmpfile() failed if inode has been initialized. Otherwise we will get following warning during umount: UBIFS error (ubi0:0 pid 1494): ubifs_assert_failed [ubifs]: UBIFS assert failed: c->bi.dd_growth == 0, in fs/ubifs/super.c:1930 VFS: Busy inodes after unmount of ubifs. Self-destruct in 5 seconds. Fixes: 9e0a1ff ("ubifs: Implement RENAME_WHITEOUT") Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com> Suggested-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Richard Weinberger <richard@nod.at>
1 parent 7a8884f commit 716b457

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

fs/ubifs/dir.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,8 @@ static int do_tmpfile(struct inode *dir, struct dentry *dentry,
432432
make_bad_inode(inode);
433433
if (!instantiated)
434434
iput(inode);
435+
else if (whiteout)
436+
iput(*whiteout);
435437
out_budg:
436438
ubifs_release_budget(c, &req);
437439
if (!instantiated)

0 commit comments

Comments
 (0)