From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de ([195.135.220.15]:39105 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932083AbcEEJoq (ORCPT ); Thu, 5 May 2016 05:44:46 -0400 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 37237AD85 for ; Thu, 5 May 2016 09:44:45 +0000 (UTC) From: David Sterba To: stable@vger.kernel.org Subject: [PATCH 16/17] Btrfs: don't use src fd for printk Date: Thu, 5 May 2016 11:44:28 +0200 Message-Id: <1462441468-3218-1-git-send-email-dsterba@suse.com> In-Reply-To: <20160505094018.GA29353@twin.jikos.cz> References: <20160505094018.GA29353@twin.jikos.cz> Sender: stable-owner@vger.kernel.org List-ID: From: Josef Bacik 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 Reviewed-by: David Sterba Signed-off-by: David Sterba --- fs/btrfs/ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 9179be240ca8..e3791f268489 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -1657,7 +1657,7 @@ static noinline int btrfs_ioctl_snap_create_transid(struct file *file, src_inode = file_inode(src.file); if (src_inode->i_sb != file_inode(file)->i_sb) { - btrfs_info(BTRFS_I(src_inode)->root->fs_info, + btrfs_info(BTRFS_I(file_inode(file))->root->fs_info, "Snapshot src from another FS"); ret = -EXDEV; } else if (!inode_owner_or_capable(src_inode)) { -- 2.7.1