From patchwork Wed Dec 11 05:56:52 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Libo Chen X-Patchwork-Id: 3322271 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id AB2FF9F37A for ; Wed, 11 Dec 2013 05:57:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E7C4320715 for ; Wed, 11 Dec 2013 05:57:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3773820714 for ; Wed, 11 Dec 2013 05:57:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751202Ab3LKF5S (ORCPT ); Wed, 11 Dec 2013 00:57:18 -0500 Received: from szxga03-in.huawei.com ([119.145.14.66]:47235 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750736Ab3LKF5Q (ORCPT ); Wed, 11 Dec 2013 00:57:16 -0500 Received: from 172.24.2.119 (EHLO szxeml206-edg.china.huawei.com) ([172.24.2.119]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id AHM58865; Wed, 11 Dec 2013 13:57:12 +0800 (CST) Received: from SZXEML453-HUB.china.huawei.com (10.82.67.196) by szxeml206-edg.china.huawei.com (172.24.2.59) with Microsoft SMTP Server (TLS) id 14.3.158.1; Wed, 11 Dec 2013 13:57:11 +0800 Received: from [127.0.0.1] (10.135.72.158) by SZXEML453-HUB.china.huawei.com (10.82.67.196) with Microsoft SMTP Server id 14.3.158.1; Wed, 11 Dec 2013 13:57:03 +0800 Message-ID: <52A7FEA4.80208@huawei.com> Date: Wed, 11 Dec 2013 13:56:52 +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] fs: btrfs: new helper: file_inode(file) 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 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;