linux/drivers/block
Nitesh Shetty 711f727f7b null_blk: Fix: memory release when memory_backed=1
[ Upstream commit 8cfb98196c ]

Memory/pages are not freed, when unloading nullblk driver.

Steps to reproduce issue
  1.free -h
        total        used        free      shared  buff/cache   available
Mem:    7.8Gi       260Mi       7.1Gi       3.0Mi       395Mi       7.3Gi
Swap:      0B          0B          0B
  2.modprobe null_blk memory_backed=1
  3.dd if=/dev/urandom of=/dev/nullb0 oflag=direct bs=1M count=1000
  4.modprobe -r null_blk
  5.free -h
        total        used        free      shared  buff/cache   available
Mem:    7.8Gi       1.2Gi       6.1Gi       3.0Mi       398Mi       6.3Gi
Swap:      0B          0B          0B

Signed-off-by: Anuj Gupta <anuj20.g@samsung.com>
Signed-off-by: Nitesh Shetty <nj.shetty@samsung.com>
Link: https://lore.kernel.org/r/20230605062354.24785-1-nj.shetty@samsung.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-06-28 11:12:39 +02:00
..
aoe
drbd drbd: correctly submit flush bio on barrier 2023-05-11 23:03:39 +09:00
mtip32xx
null_blk null_blk: Fix: memory release when memory_backed=1 2023-06-28 11:12:39 +02:00
paride
rnbd block/rnbd: replace REQ_OP_FLUSH with REQ_OP_WRITE 2023-06-09 10:34:09 +02:00
xen-blkback
zram
amiflop.c
ataflop.c
brd.c
floppy.c
Kconfig
loop.c
Makefile
n64cart.c
nbd.c nbd: Fix debugfs_create_dir error checking 2023-06-09 10:34:09 +02:00
pktcdvd.c
ps3disk.c
ps3vram.c
rbd_types.h
rbd.c rbd: get snapshot context after exclusive lock is ensured to be held 2023-06-14 11:15:28 +02:00
sunvdc.c
swim_asm.S
swim.c
swim3.c
ublk_drv.c ublk: fix AB-BA lockdep warning 2023-06-09 10:34:16 +02:00
virtio_blk.c
xen-blkfront.c xen/blkfront: Only check REQ_FUA for writes 2023-06-21 16:00:53 +02:00
z2ram.c