Skip to content

Commit c79b471

Browse files
Josef Bacikkdave
authored andcommitted
Btrfs: don't use src fd for printk
The fd we pass in may not be on a btrfs file system, so don't try to do BTRFS_I() on it. Thanks, Signed-off-by: Josef Bacik <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent 8f282f7 commit c79b471

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/btrfs/ioctl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1654,7 +1654,7 @@ static noinline int btrfs_ioctl_snap_create_transid(struct file *file,
16541654

16551655
src_inode = file_inode(src.file);
16561656
if (src_inode->i_sb != file_inode(file)->i_sb) {
1657-
btrfs_info(BTRFS_I(src_inode)->root->fs_info,
1657+
btrfs_info(BTRFS_I(file_inode(file))->root->fs_info,
16581658
"Snapshot src from another FS");
16591659
ret = -EXDEV;
16601660
} else if (!inode_owner_or_capable(src_inode)) {

0 commit comments

Comments
 (0)