proc: remove mark_inode_dirty() in .setattr()
authorChao Yu <chao@kernel.org>
Tue, 31 Jan 2023 15:08:40 +0000 (23:08 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Sat, 8 Apr 2023 20:45:36 +0000 (13:45 -0700)
procfs' .setattr() has updated i_uid, i_gid and i_mode into proc dirent,
we don't need to call mark_inode_dirty() for delayed update, remove it.

Link: https://lkml.kernel.org/r/20230131150840.34726-1-chao@kernel.org
Signed-off-by: Chao Yu <chao@kernel.org>
Reviewed-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/proc/base.c
fs/proc/generic.c
fs/proc/proc_sysctl.c

index 5e0e0cc..e34e060 100644 (file)
@@ -699,7 +699,6 @@ int proc_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
                return error;
 
        setattr_copy(&nop_mnt_idmap, inode, attr);
-       mark_inode_dirty(inode);
        return 0;
 }
 
index 8379593..42ae38f 100644 (file)
@@ -127,7 +127,6 @@ static int proc_notify_change(struct mnt_idmap *idmap,
                return error;
 
        setattr_copy(&nop_mnt_idmap, inode, iattr);
-       mark_inode_dirty(inode);
 
        proc_set_user(de, inode->i_uid, inode->i_gid);
        de->mode = inode->i_mode;
index 5851eb5..875771b 100644 (file)
@@ -841,7 +841,6 @@ static int proc_sys_setattr(struct mnt_idmap *idmap,
                return error;
 
        setattr_copy(&nop_mnt_idmap, inode, attr);
-       mark_inode_dirty(inode);
        return 0;
 }