From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752715AbdLLSgj (ORCPT ); Tue, 12 Dec 2017 13:36:39 -0500 Received: from mail-yb0-f196.google.com ([209.85.213.196]:38901 "EHLO mail-yb0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752512AbdLLSe5 (ORCPT ); Tue, 12 Dec 2017 13:34:57 -0500 X-Google-Smtp-Source: ACJfBovL94lU7VY1/AmHSqR8OI+XKfk2tBOq2PggZNEI7yJb4OQJ0vAl2rm4vRh0AZ+pVeQjPkxA0A== From: Martin Brandenburg X-Google-Original-From: Martin Brandenburg To: hubcap@omnibond.com, devel@lists.orangefs.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Martin Brandenburg Subject: [PATCH 11/18] orangefs: remove mapping_nrpages macro Date: Tue, 12 Dec 2017 13:34:17 -0500 Message-Id: <20171212183424.26406-12-martin@martinbrandenburg.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20171212183424.26406-1-martin@martinbrandenburg.com> References: <20171212183424.26406-1-martin@martinbrandenburg.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Martin Brandenburg Signed-off-by: Martin Brandenburg --- fs/orangefs/file.c | 4 +--- fs/orangefs/namei.c | 4 ++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c index afb94ed7cef3..8dfa0e8c7326 100644 --- a/fs/orangefs/file.c +++ b/fs/orangefs/file.c @@ -574,8 +574,6 @@ static int orangefs_file_mmap(struct file *file, struct vm_area_struct *vma) return 0; } -#define mapping_nrpages(idata) ((idata)->nrpages) - /* * Called to notify the module that there are no more references to * this file (i.e. no processes have it open). @@ -595,7 +593,7 @@ static int orangefs_file_release(struct inode *inode, struct file *file) */ if (file_inode(file) && file_inode(file)->i_mapping && - mapping_nrpages(&file_inode(file)->i_data)) { + file_inode(file)->i_mapping->nrpages) { if (orangefs_features & ORANGEFS_FEATURE_READAHEAD) { gossip_debug(GOSSIP_INODE_DEBUG, "calling flush_racache on %pU\n", diff --git a/fs/orangefs/namei.c b/fs/orangefs/namei.c index f79401b2486a..d3a62e52c724 100644 --- a/fs/orangefs/namei.c +++ b/fs/orangefs/namei.c @@ -330,6 +330,8 @@ static int orangefs_symlink(struct inode *dir, "Assigned symlink inode new number of %pU\n", get_khandle_from_ino(inode)); + inode->i_size = strlen(symname); + d_instantiate(dentry, inode); unlock_new_inode(inode); orangefs_set_timeout(dentry); @@ -398,6 +400,8 @@ static int orangefs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode "Assigned dir inode new number of %pU\n", get_khandle_from_ino(inode)); + inode->i_size = PAGE_SIZE; + d_instantiate(dentry, inode); unlock_new_inode(inode); orangefs_set_timeout(dentry); -- 2.15.1