lkml.org 
[lkml]   [2020]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: 回复: 回复: [PATCH] btrfs: Fix missing close devices
Date
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()


\
 
 \ /
  Last update: 2020-09-23 10:17    [W:0.131 / U:0.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site