fs: remove sb->s_mode

JIRA: https://issues.redhat.com/browse/RHEL-1516
Conflicts: drop change on f2fs which isn't enabled on rhel9

commit 81b1fb7d17c0110df839e13468ada9e99bb6e5f4
Author: Christoph Hellwig <hch@lst.de>
Date:   Thu Jun 8 13:02:45 2023 +0200

    fs: remove sb->s_mode

    There is no real need to store the open mode in the super_block now.
    It is only used by f2fs, which can easily recalculate it.

    Signed-off-by: Christoph Hellwig <hch@lst.de>
    Reviewed-by: Hannes Reinecke <hare@suse.de>
    Acked-by: Christian Brauner <brauner@kernel.org>
    Link: https://lore.kernel.org/r/20230608110258.189493-18-hch@lst.de
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Ming Lei <ming.lei@redhat.com>
This commit is contained in:
Ming Lei 2023-06-08 13:02:45 +02:00
parent 2234f7161d
commit 6f448b040b
3 changed files with 0 additions and 4 deletions

View File

@ -1306,7 +1306,6 @@ nilfs_mount(struct file_system_type *fs_type, int flags,
s_new = true;
/* New superblock instance created */
s->s_mode = mode;
snprintf(s->s_id, sizeof(s->s_id), "%pg", sd.bdev);
sb_set_blocksize(s, block_size(sd.bdev));

View File

@ -1300,7 +1300,6 @@ int get_tree_bdev(struct fs_context *fc,
blkdev_put(bdev, fc->fs_type);
down_write(&s->s_umount);
} else {
s->s_mode = mode;
snprintf(s->s_id, sizeof(s->s_id), "%pg", bdev);
shrinker_debugfs_rename(&s->s_shrink, "sb-%s:%s",
fc->fs_type->name, s->s_id);
@ -1374,7 +1373,6 @@ struct dentry *mount_bdev(struct file_system_type *fs_type,
blkdev_put(bdev, fs_type);
down_write(&s->s_umount);
} else {
s->s_mode = mode;
snprintf(s->s_id, sizeof(s->s_id), "%pg", bdev);
shrinker_debugfs_rename(&s->s_shrink, "sb-%s:%s",
fs_type->name, s->s_id);

View File

@ -1542,7 +1542,6 @@ struct super_block {
uuid_t s_uuid; /* UUID */
unsigned int s_max_links;
fmode_t s_mode;
/*
* The next field is for VFS *only*. No filesystems have any business