nilfs2: remove redundant super block commit
PATCH 1/1 nilfs2: remove redundant super block commit
Hi,
This is a patch to remove redundant super block commit.
nilfs_write_super will call nilfs_commit_super to store super block into block device. However, nilfs_put_super will call nilfs_commit_super right after calling nilfs_write_super.
So calling nilfs_write_super in nilfs_put_super would be redundant.
thanks,
regards,
Signature · 7 lines
Jiro SEKIBA <[email protected]> Signed-off-by: Jiro SEKIBA <[email protected]> --- fs/nilfs2/super.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-)
fs/nilfs2/super.c +0 -3
@@ -313,9 +313,6 @@ static void nilfs_put_super(struct super_block *sb)lock_kernel (); -if (sb->s_dirt) -nilfs_write_super (sb); -nilfs_detach_segment_constructor (sbi);if (!(sb->s_flags &MS_RDONLY )) {
Signature · 1 line
1.5.6.5
A message that is not in the archive (sent off-list or not yet received): 87ljmxruns.wl%[email protected]
Ryusuke Konishi
AppliedHi,
Quoted 4 lines · Jiro SEKIBA
Hi,
This is a patch to remove redundant super block commit.
Quoted 12 lines
nilfs_write_superwill callnilfs_commit_superto store super block into block device. However,nilfs_put_superwill callnilfs_commit_superright after callingnilfs_write_super.
So callingnilfs_write_superinnilfs_put_superwould be redundant.thanks,
regards,
Signature · 3 lines
Jiro SEKIBA <[email protected]> Signed-off-by: Jiro SEKIBA <[email protected]>
Applied. Thanks!
Due to the recent changes on vfs interface, some functions in fs/nilfs2/super.c has room for cleanup like this.
Further, there is a discussion about eliminating the write_super() callback in LKML. The function was periodically called from the vfs layer to induce a writeback of superblock. It is now deemed not to be required if a file system handles the timing. I feel the writeback control of the superblock should be revised overall for nilfs.
I would appreciate it if you could help me to do the series of cleanup jobs.
Thanks,
Ryusuke Konishi
Quoted 22 lines
--- fs/nilfs2/super.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-)fs/nilfs2/super.c +0
-3@@ -313,9 +313,6 @@ static void nilfs_put_super(struct super_block *sb)lock_kernel (); -if (sb->s_dirt) -nilfs_write_super (sb); -nilfs_detach_segment_constructor (sbi);if (!(sb->s_flags &MS_RDONLY )) {Signature · 1 line
1.5.6.5