linux-stable/fs
Filipe Manana 968757f1f4 btrfs: fix missing snapshot drew unlock when root is dead during swap activation
[ Upstream commit 9c803c474c ]

When activating a swap file we acquire the root's snapshot drew lock and
then check if the root is dead, failing and returning with -EPERM if it's
dead but without unlocking the root's snapshot lock. Fix this by adding
the missing unlock.

Fixes: 60021bd754 ("btrfs: prevent subvol with swapfile from being deleted")
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-12-14 19:51:43 +01:00
..
9p
adfs
affs
afs
autofs
befs
bfs
btrfs btrfs: fix missing snapshot drew unlock when root is dead during swap activation 2024-12-14 19:51:43 +01:00
cachefiles
ceph
cifs
coda
configfs
cramfs
crypto
debugfs
devpts
dlm
ecryptfs
efivarfs
efs
erofs
exfat
exportfs
ext2
ext4
f2fs f2fs: fix f2fs_bug_on when uninstalling filesystem call f2fs_evict_inode. 2024-12-14 19:51:41 +01:00
fat
freevxfs
fscache
fuse
gfs2
hfs
hfsplus
hostfs
hpfs
hugetlbfs
iomap
isofs
jbd2
jffs2 jffs2: fix use of uninitialized variable 2024-12-14 19:51:20 +01:00
jfs jfs: add a check to prevent array-index-out-of-bounds in dbAdjTree 2024-12-14 19:51:39 +01:00
kernfs
ksmbd
lockd
minix
netfs
nfs nfs: ignore SB_RDONLY when mounting nfs 2024-12-14 19:51:21 +01:00
nfs_common
nfsd nfsd: fix nfs4_openowner leak when concurrent nfsd4_open occur 2024-12-14 19:51:24 +01:00
nilfs2 nilfs2: fix potential out-of-bounds memory access in nilfs_find_entry() 2024-12-14 19:51:33 +01:00
nls
notify
ntfs
ntfs3
ocfs2 ocfs2: update seq_file index in ocfs2_dlm_seq_next 2024-12-14 19:51:34 +01:00
omfs
openpromfs
orangefs
overlayfs ovl: properly handle large files in ovl_security_fileattr 2024-12-14 19:51:23 +01:00
proc
pstore
qnx4
qnx6
quota quota: flush quota_release_work upon quota writeback 2024-12-14 19:51:22 +01:00
ramfs
reiserfs
romfs
smbfs_common
squashfs
sysfs
sysv
tracefs
ubifs ubifs: authentication: Fix use-after-free in ubifs_tnc_end_commit 2024-12-14 19:51:20 +01:00
udf
ufs
unicode
vboxsf
verity
xfs xfs: remove unknown compat feature check in superblock write validation 2024-12-14 19:51:22 +01:00
zonefs
aio.c
anon_inodes.c
attr.c
bad_inode.c
binfmt_aout.c
binfmt_elf_fdpic.c
binfmt_elf.c
binfmt_flat.c
binfmt_misc.c
binfmt_script.c
buffer.c
char_dev.c
compat_binfmt_elf.c
coredump.c
d_path.c
dax.c
dcache.c
direct-io.c
drop_caches.c
eventfd.c
eventpoll.c epoll: annotate racy check 2024-12-14 19:51:34 +01:00
exec.c
fcntl.c
fhandle.c
file_table.c
file.c
filesystems.c
fs_context.c
fs_parser.c
fs_pin.c
fs_struct.c
fs_types.c
fs-writeback.c
fsopen.c
init.c
inode.c
internal.h
ioctl.c
Kconfig
Kconfig.binfmt
kernel_read_file.c
libfs.c
locks.c
Makefile
mbcache.c
mount.h
mpage.c
namei.c
namespace.c
no-block.c
nsfs.c
open.c
pipe.c
pnode.c
pnode.h
posix_acl.c
proc_namespace.c
read_write.c
readdir.c
remap_range.c
select.c
seq_file.c
signalfd.c
splice.c
stack.c
stat.c
statfs.c
super.c
sync.c
timerfd.c
userfaultfd.c
utimes.c
xattr.c