Merge tag 'for-6.15-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux
Pull btrfs fixes from David Sterba: - handle encoded read ioctl returning EAGAIN so it does not mistakenly free the work structure - escape subvolume path in mount option list so it cannot be wrongly parsed when the path contains "," - remove folio size assertions when writing super block to device with enabled large folios * tag 'for-6.15-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: remove folio order ASSERT()s in super block writeback path btrfs: correctly escape subvol in btrfs_show_options() btrfs: ioctl: don't free iov when btrfs_encoded_read() returns -EAGAIN
This commit is contained in:
@@ -3853,7 +3853,6 @@ static int write_dev_supers(struct btrfs_device *device,
|
||||
atomic_inc(&device->sb_write_errors);
|
||||
continue;
|
||||
}
|
||||
ASSERT(folio_order(folio) == 0);
|
||||
|
||||
offset = offset_in_folio(folio, bytenr);
|
||||
disk_super = folio_address(folio) + offset;
|
||||
@@ -3926,7 +3925,6 @@ static int wait_dev_supers(struct btrfs_device *device, int max_mirrors)
|
||||
/* If the folio has been removed, then we know it completed. */
|
||||
if (IS_ERR(folio))
|
||||
continue;
|
||||
ASSERT(folio_order(folio) == 0);
|
||||
|
||||
/* Folio will be unlocked once the write completes. */
|
||||
folio_wait_locked(folio);
|
||||
|
||||
@@ -4902,6 +4902,8 @@ static int btrfs_uring_encoded_read(struct io_uring_cmd *cmd, unsigned int issue
|
||||
|
||||
ret = btrfs_encoded_read(&kiocb, &data->iter, &data->args, &cached_state,
|
||||
&disk_bytenr, &disk_io_size);
|
||||
if (ret == -EAGAIN)
|
||||
goto out_acct;
|
||||
if (ret < 0 && ret != -EIOCBQUEUED)
|
||||
goto out_free;
|
||||
|
||||
|
||||
+1
-2
@@ -1139,8 +1139,7 @@ static int btrfs_show_options(struct seq_file *seq, struct dentry *dentry)
|
||||
subvol_name = btrfs_get_subvol_name_from_objectid(info,
|
||||
btrfs_root_id(BTRFS_I(d_inode(dentry))->root));
|
||||
if (!IS_ERR(subvol_name)) {
|
||||
seq_puts(seq, ",subvol=");
|
||||
seq_escape(seq, subvol_name, " \t\n\\");
|
||||
seq_show_option(seq, "subvol", subvol_name);
|
||||
kfree(subvol_name);
|
||||
}
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user