mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-01-11 17:10:13 +00:00
for-6.18-tag
-----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE8rQSAMVO+zA4DBdWxWXV+ddtWDsFAmjj18wACgkQxWXV+ddt WDvotw//Z50Clttkc87HLmrRbLC/A2xm0YRtaDA6HvaQGMtI17+QegdNZB+yiC7K wSXeh/Je+kdb97YGW2NjBtY5bwMaIpSaAxxvumPd1xsKwrgGRx/BbwKAeOMn4KWq 3lTynA0vKkL7F3GfsYY0W8IPvUsw4zb0sigSNK6/eDAGCRf6m3jWZCC9EBvaVb84 VumPKsGK/KNCRo2xvXEqcqCA4KVrE3JUa/jMyddkTjIPm7tqD2l0J8P0v99AG5+s OaqJU3pUEukpzw41va1JF3eaOVQ8PfFhwGAHvVBKoGy3ownRXikwf05inq93+EBX cbcb4j2mxjv+H6Zy415GBg6kK9A/y9KTI1us/eQgOZtKLXwrySLLocA7aYw/AdxS kGTgwBgUc3BPbpa/mLj6HOemRl+fHNC6EgdsX1/PN+vx9cend7kOJsw1YCqe5c7E 5s8YHFbBca53HzeUS78yqikjG9B3KRY+rKyO8wO0dwozTkDD9Dy3SFO3dtMNaTdm ipxqOjMNYgUDUauKQzDiCdZiQ1yHb3NjTANP6sP35PlBdmjXHqp9TsgsxSNezv6V GBsgcSyZtawyaZlUvg0c4MLYLx3kOsY97ywn7n/dbcZC/EC07tauwD6XnlbARqJu nYQ/drZIImvuDekrIBLxvSpJOinsZ60jYlkRhREbEXT47jUE9zU= =SVmB -----END PGP SIGNATURE----- Merge tag 'for-6.18-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "Two short fixes that would be good to have before rc1" * tag 'for-6.18-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: fix PAGE_SIZE format specifier in open_ctree() btrfs: avoid potential out-of-bounds in btrfs_encode_fh()
This commit is contained in:
commit
c746c3b516
@ -3397,7 +3397,7 @@ int __cold open_ctree(struct super_block *sb, struct btrfs_fs_devices *fs_device
|
||||
|
||||
if (fs_info->sectorsize > PAGE_SIZE)
|
||||
btrfs_warn(fs_info,
|
||||
"support for block size %u with page size %zu is experimental, some features may be missing",
|
||||
"support for block size %u with page size %lu is experimental, some features may be missing",
|
||||
fs_info->sectorsize, PAGE_SIZE);
|
||||
/*
|
||||
* Handle the space caching options appropriately now that we have the
|
||||
|
||||
@ -23,7 +23,11 @@ static int btrfs_encode_fh(struct inode *inode, u32 *fh, int *max_len,
|
||||
int type;
|
||||
|
||||
if (parent && (len < BTRFS_FID_SIZE_CONNECTABLE)) {
|
||||
*max_len = BTRFS_FID_SIZE_CONNECTABLE;
|
||||
if (btrfs_root_id(BTRFS_I(inode)->root) !=
|
||||
btrfs_root_id(BTRFS_I(parent)->root))
|
||||
*max_len = BTRFS_FID_SIZE_CONNECTABLE_ROOT;
|
||||
else
|
||||
*max_len = BTRFS_FID_SIZE_CONNECTABLE;
|
||||
return FILEID_INVALID;
|
||||
} else if (len < BTRFS_FID_SIZE_NON_CONNECTABLE) {
|
||||
*max_len = BTRFS_FID_SIZE_NON_CONNECTABLE;
|
||||
@ -45,6 +49,8 @@ static int btrfs_encode_fh(struct inode *inode, u32 *fh, int *max_len,
|
||||
parent_root_id = btrfs_root_id(BTRFS_I(parent)->root);
|
||||
|
||||
if (parent_root_id != fid->root_objectid) {
|
||||
if (*max_len < BTRFS_FID_SIZE_CONNECTABLE_ROOT)
|
||||
return FILEID_INVALID;
|
||||
fid->parent_root_objectid = parent_root_id;
|
||||
len = BTRFS_FID_SIZE_CONNECTABLE_ROOT;
|
||||
type = FILEID_BTRFS_WITH_PARENT_ROOT;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user