mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-04-29 12:28:27 +02:00
Merge tag 'for-6.6-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux
Pull btrfs fixes from David Sterba: "A revert of recent mount option parsing fix, this breaks mounts with security options. The second patch is a flexible array annotation" * tag 'for-6.6-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: add __counted_by for struct btrfs_delayed_item and use struct_size() Revert "btrfs: reject unknown mount options early"
This commit is contained in:
@@ -313,7 +313,7 @@ static struct btrfs_delayed_item *btrfs_alloc_delayed_item(u16 data_len,
|
||||
{
|
||||
struct btrfs_delayed_item *item;
|
||||
|
||||
item = kmalloc(sizeof(*item) + data_len, GFP_NOFS);
|
||||
item = kmalloc(struct_size(item, data, data_len), GFP_NOFS);
|
||||
if (item) {
|
||||
item->data_len = data_len;
|
||||
item->type = type;
|
||||
|
||||
@@ -95,7 +95,7 @@ struct btrfs_delayed_item {
|
||||
bool logged;
|
||||
/* The maximum leaf size is 64K, so u16 is more than enough. */
|
||||
u16 data_len;
|
||||
char data[];
|
||||
char data[] __counted_by(data_len);
|
||||
};
|
||||
|
||||
static inline void btrfs_init_delayed_root(
|
||||
|
||||
@@ -954,10 +954,6 @@ static int btrfs_parse_subvol_options(const char *options, char **subvol_name,
|
||||
|
||||
*subvol_objectid = subvolid;
|
||||
break;
|
||||
case Opt_err:
|
||||
btrfs_err(NULL, "unrecognized mount option '%s'", p);
|
||||
error = -EINVAL;
|
||||
goto out;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user