[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK+_RL=beej+8QK8+0Q=wffxy-4vk1VyuAmeG+43T0FU_cvwpA@mail.gmail.com>
Date: Tue, 10 Feb 2026 11:31:14 +0000
From: Tigran Aivazian <aivazian.tigran@...il.com>
To: Ziyi Guo <n7l8m4@...orthwestern.edu>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] bfs: reject inodes with zero link count in bfs_iget()
Hi,
On Sun, 8 Feb 2026 at 18:51, Ziyi Guo <n7l8m4@...orthwestern.edu> wrote:
> diff --git a/fs/bfs/inode.c b/fs/bfs/inode.c
> index ce6f83234b67..85d664e169f0 100644
> --- a/fs/bfs/inode.c
> +++ b/fs/bfs/inode.c
> @@ -96,6 +96,10 @@ struct inode *bfs_iget(struct super_block *sb, unsigned long ino)
> i_uid_write(inode, le32_to_cpu(di->i_uid));
> i_gid_write(inode, le32_to_cpu(di->i_gid));
> set_nlink(inode, le32_to_cpu(di->i_nlink));
> + if (!inode->i_nlink) {
> + brelse(bh);
> + goto error;
> + }
> inode->i_size = BFS_FILESIZE(di);
> inode->i_blocks = BFS_FILEBLOCKS(di);
> inode_set_atime(inode, le32_to_cpu(di->i_atime), 0);
Looks fine to me, thank you.
Reviewed-by: Tigran Aivazian <aivazian.tigran@...il.com>
Powered by blists - more mailing lists