Skip to content

Commit 0cb9ce0

Browse files
committed
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
2 parents a54f4a9 + 65f2a3b commit 0cb9ce0

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

fs/btrfs/disk-io.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3853,7 +3853,6 @@ static int write_dev_supers(struct btrfs_device *device,
38533853
atomic_inc(&device->sb_write_errors);
38543854
continue;
38553855
}
3856-
ASSERT(folio_order(folio) == 0);
38573856

38583857
offset = offset_in_folio(folio, bytenr);
38593858
disk_super = folio_address(folio) + offset;
@@ -3926,7 +3925,6 @@ static int wait_dev_supers(struct btrfs_device *device, int max_mirrors)
39263925
/* If the folio has been removed, then we know it completed. */
39273926
if (IS_ERR(folio))
39283927
continue;
3929-
ASSERT(folio_order(folio) == 0);
39303928

39313929
/* Folio will be unlocked once the write completes. */
39323930
folio_wait_locked(folio);

fs/btrfs/ioctl.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4902,6 +4902,8 @@ static int btrfs_uring_encoded_read(struct io_uring_cmd *cmd, unsigned int issue
49024902

49034903
ret = btrfs_encoded_read(&kiocb, &data->iter, &data->args, &cached_state,
49044904
&disk_bytenr, &disk_io_size);
4905+
if (ret == -EAGAIN)
4906+
goto out_acct;
49054907
if (ret < 0 && ret != -EIOCBQUEUED)
49064908
goto out_free;
49074909

fs/btrfs/super.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,8 +1139,7 @@ static int btrfs_show_options(struct seq_file *seq, struct dentry *dentry)
11391139
subvol_name = btrfs_get_subvol_name_from_objectid(info,
11401140
btrfs_root_id(BTRFS_I(d_inode(dentry))->root));
11411141
if (!IS_ERR(subvol_name)) {
1142-
seq_puts(seq, ",subvol=");
1143-
seq_escape(seq, subvol_name, " \t\n\\");
1142+
seq_show_option(seq, "subvol", subvol_name);
11441143
kfree(subvol_name);
11451144
}
11461145
return 0;

0 commit comments

Comments
 (0)