diff options
| author | Kent Overstreet <kent.overstreet@linux.dev> | 2025-02-25 18:58:46 -0500 |
|---|---|---|
| committer | Kent Overstreet <kent.overstreet@linux.dev> | 2025-03-14 21:02:16 -0400 |
| commit | 13fd6be102f75de25099757718c1de46fa57ae7a (patch) | |
| tree | 56799a551c44b578fc40828967124affa6faf35d /fs/bcachefs/super-io.c | |
| parent | bcachefs: Finish bch2_account_io_completion() conversions (diff) | |
| download | linux-13fd6be102f75de25099757718c1de46fa57ae7a.tar.gz linux-13fd6be102f75de25099757718c1de46fa57ae7a.zip | |
bcachefs: Stash a pointer to the filesystem for blk_holder_ops
Note that we open block devices before we allocate bch_fs, but once
attached to a filesystem they will be closed before the bch_fs is torn
down - so stashing a pointer without a refcount looks incorrect but it's
not.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/super-io.c')
| -rw-r--r-- | fs/bcachefs/super-io.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/super-io.c b/fs/bcachefs/super-io.c index 2fef285cfc1a..74f1e45980db 100644 --- a/fs/bcachefs/super-io.c +++ b/fs/bcachefs/super-io.c @@ -748,7 +748,7 @@ retry: memset(sb, 0, sizeof(*sb)); sb->mode = BLK_OPEN_READ; sb->have_bio = true; - sb->holder = kmalloc(1, GFP_KERNEL); + sb->holder = kzalloc(sizeof(*sb->holder), GFP_KERNEL); if (!sb->holder) return -ENOMEM; |
