Skip to content

Commit 33d23d8

Browse files
konisakpm00
authored andcommitted
nilfs2: do not repair reserved inode bitmap in nilfs_new_inode()
After commit 93aef9e ("nilfs2: fix incorrect inode allocation from reserved inodes") is applied, the inode number returned by nilfs_ifile_create_inode() is guaranteed to always be greater than or equal to NILFS_USER_INO, so if the inode number is a reserved inode number (less than NILFS_USER_INO), the code to repair the bitmap immediately following it is no longer executed. So, delete it. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Ryusuke Konishi <[email protected]> Cc: Huang Xiaojia <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 9860f43 commit 33d23d8

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

fs/nilfs2/inode.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -345,19 +345,6 @@ struct inode *nilfs_new_inode(struct inode *dir, umode_t mode)
345345
if (unlikely(err))
346346
goto failed_ifile_create_inode;
347347
/* reference count of i_bh inherits from nilfs_mdt_read_block() */
348-
349-
if (unlikely(ino < NILFS_USER_INO)) {
350-
nilfs_warn(sb,
351-
"inode bitmap is inconsistent for reserved inodes");
352-
do {
353-
brelse(bh);
354-
err = nilfs_ifile_create_inode(root->ifile, &ino, &bh);
355-
if (unlikely(err))
356-
goto failed_ifile_create_inode;
357-
} while (ino < NILFS_USER_INO);
358-
359-
nilfs_info(sb, "repaired inode bitmap for reserved inodes");
360-
}
361348
ii->i_bh = bh;
362349

363350
atomic64_inc(&root->inodes_count);

0 commit comments

Comments
 (0)