From: Ryusuke Konishi <konishi.ryusuke@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-nilfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 5/8] nilfs2: do not repair reserved inode bitmap in nilfs_new_inode()
Date: Tue, 27 Aug 2024 02:41:13 +0900 [thread overview]
Message-ID: <20240826174116.5008-6-konishi.ryusuke@gmail.com> (raw)
In-Reply-To: <20240826174116.5008-1-konishi.ryusuke@gmail.com>
After commit 93aef9eda1ce ("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.
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
---
fs/nilfs2/inode.c | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/fs/nilfs2/inode.c b/fs/nilfs2/inode.c
index 3c4a0577bc71..3742baec4920 100644
--- a/fs/nilfs2/inode.c
+++ b/fs/nilfs2/inode.c
@@ -345,19 +345,6 @@ struct inode *nilfs_new_inode(struct inode *dir, umode_t mode)
if (unlikely(err))
goto failed_ifile_create_inode;
/* reference count of i_bh inherits from nilfs_mdt_read_block() */
-
- if (unlikely(ino < NILFS_USER_INO)) {
- nilfs_warn(sb,
- "inode bitmap is inconsistent for reserved inodes");
- do {
- brelse(bh);
- err = nilfs_ifile_create_inode(root->ifile, &ino, &bh);
- if (unlikely(err))
- goto failed_ifile_create_inode;
- } while (ino < NILFS_USER_INO);
-
- nilfs_info(sb, "repaired inode bitmap for reserved inodes");
- }
ii->i_bh = bh;
atomic64_inc(&root->inodes_count);
--
2.34.1
next prev parent reply other threads:[~2024-08-26 17:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-26 17:41 [PATCH 0/8] nilfs2: assorted cleanups Ryusuke Konishi
2024-08-26 17:41 ` [PATCH 1/8] nilfs2: use common implementation of file type Ryusuke Konishi
2024-08-26 17:41 ` [PATCH 2/8] nilfs2: use the BITS_PER_LONG macro Ryusuke Konishi
2024-08-26 17:41 ` [PATCH 3/8] nilfs2: separate inode type information from i_state field Ryusuke Konishi
2024-08-26 17:41 ` [PATCH 4/8] nilfs2: eliminate the shared counter and spinlock for i_generation Ryusuke Konishi
2024-08-26 17:41 ` Ryusuke Konishi [this message]
2024-08-26 17:41 ` [PATCH 6/8] nilfs2: remove sc_timer_task Ryusuke Konishi
2024-08-26 17:41 ` [PATCH 7/8] nilfs2: use kthread_create and kthread_stop for the log writer thread Ryusuke Konishi
2024-08-26 17:41 ` [PATCH 8/8] nilfs2: refactor nilfs_segctor_thread() Ryusuke Konishi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240826174116.5008-6-konishi.ryusuke@gmail.com \
--to=konishi.ryusuke@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nilfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox