mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
fs: add an icount_read helper
Instead of doing direct access to ->i_count, add a helper to handle this. This will make it easier to convert i_count to a refcount later. Signed-off-by: Josef Bacik <josef@toxicpanda.com> Link: https://lore.kernel.org/9bc62a84c6b9d6337781203f60837bd98fbc4a96.1756222464.git.josef@toxicpanda.com Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
committed by
Christian Brauner
parent
9e70e985bd
commit
37b27bd5d6
@@ -184,7 +184,7 @@ void hpfs_write_inode(struct inode *i)
|
||||
struct hpfs_inode_info *hpfs_inode = hpfs_i(i);
|
||||
struct inode *parent;
|
||||
if (i->i_ino == hpfs_sb(i->i_sb)->sb_root) return;
|
||||
if (hpfs_inode->i_rddir_off && !atomic_read(&i->i_count)) {
|
||||
if (hpfs_inode->i_rddir_off && !icount_read(i)) {
|
||||
if (*hpfs_inode->i_rddir_off)
|
||||
pr_err("write_inode: some position still there\n");
|
||||
kfree(hpfs_inode->i_rddir_off);
|
||||
|
||||
Reference in New Issue
Block a user