Messages in this thread | | | From | Johannes Thumshirn <> | Subject | Re: 回复: 回复: [PATCH] btrfs: Fix missing close devices | Date | Wed, 23 Sep 2020 08:17:07 +0000 |
| |
On 23/09/2020 08:03, Zhang, Qiang wrote: > Hello Johannes Thumshirn > > the crash happend in "snprintf(s->s_id, sizeof(s->s_id), "%pg", bdev)" in btrfs_mount_root func, the "bdev" may be destroyed in btrfs_close_devices. > I think add btrfs_close_devices func before deactivate_locked_super is reasonable. > I'm not sure if that's another problem . > What's your point of view ? >
I think this is generally unneeded. Think of this call chain: deactivate_locked_super() `-> fs->kill_sb() `-> btrfs_kill_super() `-> kill_anon_super() `-> generic_shutdown_super() `-> sop->put_super() `-> btrfs_put_super() `-> close_ctree() `-> btrfs_close_devices()
| |