Skip to content

Commit 5069ba8

Browse files
Christoph Hellwigbrauner
authored andcommitted
NFS: switch back to using kill_anon_super
NFS switch to open coding kill_anon_super in 7b14a21 ("nfs: don't call bdi_unregister") to avoid the extra bdi_unregister call. At that point bdi_destroy was called in nfs_free_server and thus it required a later freeing of the anon dev_t. But since 0db1094 ("nfs: Convert to separately allocated bdi") the bdi has been free implicitly by the sb destruction, so this isn't needed anymore. By not open coding kill_anon_super, nfs now inherits the fix in dc3216b ("super: ensure valid info"), and we remove the only open coded version of kill_anon_super. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Jan Kara <jack@suse.cz> Message-Id: <20230831052940.256193-1-hch@lst.de> Signed-off-by: Christian Brauner <brauner@kernel.org>
1 parent ec952aa commit 5069ba8

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

fs/nfs/super.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1339,15 +1339,13 @@ int nfs_get_tree_common(struct fs_context *fc)
13391339
void nfs_kill_super(struct super_block *s)
13401340
{
13411341
struct nfs_server *server = NFS_SB(s);
1342-
dev_t dev = s->s_dev;
13431342

13441343
nfs_sysfs_move_sb_to_server(server);
1345-
generic_shutdown_super(s);
1344+
kill_anon_super(s);
13461345

13471346
nfs_fscache_release_super_cookie(s);
13481347

13491348
nfs_free_server(server);
1350-
free_anon_bdev(dev);
13511349
}
13521350
EXPORT_SYMBOL_GPL(nfs_kill_super);
13531351

0 commit comments

Comments
 (0)