From patchwork Wed Dec 11 06:03:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Libo Chen X-Patchwork-Id: 3322321 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8FBEDC0D4A for ; Wed, 11 Dec 2013 06:04:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C619E2071B for ; Wed, 11 Dec 2013 06:04:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 01B2520715 for ; Wed, 11 Dec 2013 06:04:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750971Ab3LKGEX (ORCPT ); Wed, 11 Dec 2013 01:04:23 -0500 Received: from szxga01-in.huawei.com ([119.145.14.64]:39630 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750782Ab3LKGEW (ORCPT ); Wed, 11 Dec 2013 01:04:22 -0500 Received: from 172.24.2.119 (EHLO szxeml212-edg.china.huawei.com) ([172.24.2.119]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id BOD03591; Wed, 11 Dec 2013 14:04:17 +0800 (CST) Received: from SZXEML414-HUB.china.huawei.com (10.82.67.153) by szxeml212-edg.china.huawei.com (172.24.2.181) with Microsoft SMTP Server (TLS) id 14.3.158.1; Wed, 11 Dec 2013 14:04:16 +0800 Received: from [127.0.0.1] (10.135.72.158) by SZXEML414-HUB.china.huawei.com (10.82.67.153) with Microsoft SMTP Server id 14.3.158.1; Wed, 11 Dec 2013 14:04:10 +0800 Message-ID: <52A8004F.4090705@huawei.com> Date: Wed, 11 Dec 2013 14:03:59 +0800 From: Libo Chen User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: , , , CC: , LKML , , , , , Li Zefan Subject: [PATCH RESEND] fs: btrfs: new helper: file_inode(file) References: <52A7FEA4.80208@huawei.com> In-Reply-To: <52A7FEA4.80208@huawei.com> X-Forwarded-Message-Id: <52A7FEA4.80208@huawei.com> X-Originating-IP: [10.135.72.158] X-CFilter-Loop: Reflected Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Libo Chen --- fs/btrfs/ioctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) - just change style diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index a111622..fdfc0d7 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -2690,7 +2690,7 @@ static long btrfs_ioctl_file_extent_same(struct file *file, struct btrfs_ioctl_same_args tmp; struct btrfs_ioctl_same_args *same; struct btrfs_ioctl_same_extent_info *info; - struct inode *src = file->f_dentry->d_inode; + struct inode *src = file_inode(file); struct file *dst_file = NULL; struct inode *dst; u64 off; @@ -2779,7 +2779,7 @@ static long btrfs_ioctl_file_extent_same(struct file *file, if (file->f_path.mnt != dst_file->f_path.mnt) goto next; - dst = dst_file->f_dentry->d_inode; + dst = file_inode(dst_file); if (src->i_sb != dst->i_sb) goto next;