Received: by 10.192.165.148 with SMTP id m20csp4613249imm; Tue, 8 May 2018 11:12:57 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo4mdztVkEN78II2X1P8JfIu9OMJw8oPfissjFtbGrKqOY0sGhGE+HGrjAPIcXflgC26Ik0 X-Received: by 2002:a63:9314:: with SMTP id b20-v6mr33658582pge.309.1525803177644; Tue, 08 May 2018 11:12:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525803177; cv=none; d=google.com; s=arc-20160816; b=fAhGvBZ3UxvevHTotLS1rdBnE0xSFl+rkPzJuuPD5Fjic/kxKbaY95aE//tmjlevO4 Wig73A+nPKkhjcHOV8lcxMx0PAODy++Kzcce/rErN5GhSaU1K5o9YP7DZW/uIQ+cwpNo IFSmLJQZ0GcFX3PqZuRI/OAHkTJmNtj2+YtyJCjTvTlFQlntGEPsjZOnuscKmJ5cDC6P 9uQlWoM+FQpCp2TqOaYGQESuwXt5U2Brxtd9WfWOleGHau9G4C+QlC39XKgJPtFaa/nk VS8bLyGlwRuo99JtjbBDLwLcmMrGHwlGxRXdu5okxBmv3DW7bNXozNnLqzzYSp6A5ZoK dB+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=l+TglSOLeZb/7iWsbNPWvsF+R/Qd4vZS+zKlAugwsCo=; b=gKAGdH9ri/yeoU79es6SEJzsLPBE+fDrgk1wg0Q5zV7msG9DZlDfwxb+Kw6W7dST9K NFNZHd23MwgpHKWq/r/k4qxdZmt/2Mu7tHNqwwrHuzXAatCI0Y3h/YcxefHjfZLVDdnR B6ZOoVslTNYTieshgrtp48rRAnpMe0UZdttlqlmS0BoFyFDT4FR2gTtN0d6SZlBNfhl9 3KDLZzcq5kMuO8KrdSWAohUoa6j4we/V/nxfRDLqXfOvejXAEAG7+bQB9kOxwTj4xgFH a+6dbJJLwhey9oYhJ9oHfr3LvheQfNERLEMJY6Hxud3NsU5AOXw/rqwWre/w5sYqrwPn p7Mw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q4-v6si24256901plb.251.2018.05.08.11.12.43; Tue, 08 May 2018 11:12:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933224AbeEHSKt (ORCPT + 99 others); Tue, 8 May 2018 14:10:49 -0400 Received: from mx2.suse.de ([195.135.220.15]:54278 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932849AbeEHSGV (ORCPT ); Tue, 8 May 2018 14:06:21 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id BF455AE08; Tue, 8 May 2018 18:06:19 +0000 (UTC) From: Mark Fasheh To: linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-btrfs@vger.kernel.org, Mark Fasheh Subject: [PATCH 64/76] fs/read: Use inode_sb() helper instead of inode->i_sb Date: Tue, 8 May 2018 11:04:24 -0700 Message-Id: <20180508180436.716-65-mfasheh@suse.de> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180508180436.716-1-mfasheh@suse.de> References: <20180508180436.716-1-mfasheh@suse.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Mark Fasheh --- fs/read_write.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/fs/read_write.c b/fs/read_write.c index f8547b82dfb3..cf9900707558 100644 --- a/fs/read_write.c +++ b/fs/read_write.c @@ -146,7 +146,7 @@ loff_t generic_file_llseek(struct file *file, loff_t offset, int whence) struct inode *inode = file->f_mapping->host; return generic_file_llseek_size(file, offset, whence, - inode->i_sb->s_maxbytes, + inode_sb(inode)->s_maxbytes, i_size_read(inode)); } EXPORT_SYMBOL(generic_file_llseek); @@ -1389,7 +1389,8 @@ static ssize_t do_sendfile(int out_fd, int in_fd, loff_t *ppos, goto fput_out; if (!max) - max = min(in_inode->i_sb->s_maxbytes, out_inode->i_sb->s_maxbytes); + max = min(inode_sb(in_inode)->s_maxbytes, + inode_sb(out_inode)->s_maxbytes); if (unlikely(pos + count > max)) { retval = -EOVERFLOW; @@ -1549,7 +1550,7 @@ ssize_t vfs_copy_file_range(struct file *file_in, loff_t pos_in, return -EBADF; /* this could be relaxed once a method supports cross-fs copies */ - if (inode_in->i_sb != inode_out->i_sb) + if (inode_sb(inode_in) != inode_sb(inode_out)) return -EXDEV; if (len == 0) @@ -1694,7 +1695,7 @@ int vfs_clone_file_prep_inodes(struct inode *inode_in, loff_t pos_in, struct inode *inode_out, loff_t pos_out, u64 *len, bool is_dedupe) { - loff_t bs = inode_out->i_sb->s_blocksize; + loff_t bs = inode_sb(inode_out)->s_blocksize; loff_t blen; loff_t isize; bool same_inode = (inode_in == inode_out); @@ -1808,7 +1809,7 @@ int vfs_clone_file_range(struct file *file_in, loff_t pos_in, * the same mount. Practically, they only need to be on the same file * system. */ - if (inode_in->i_sb != inode_out->i_sb) + if (inode_sb(inode_in) != inode_sb(inode_out)) return -EXDEV; if (!(file_in->f_mode & FMODE_READ) || -- 2.15.1