From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt0-f195.google.com ([209.85.216.195]:45249 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751578AbeCTRCw (ORCPT ); Tue, 20 Mar 2018 13:02:52 -0400 Received: by mail-qt0-f195.google.com with SMTP id f8so2344811qtg.12 for ; Tue, 20 Mar 2018 10:02:52 -0700 (PDT) From: Martin Brandenburg To: hubcap@omnibond.com, linux-fsdevel@vger.kernel.org Cc: Martin Brandenburg Subject: [PATCH 10/24] orangefs: do not invalidate attributes on inode create Date: Tue, 20 Mar 2018 17:02:20 +0000 Message-Id: <20180320170234.1412-11-martin@omnibond.com> In-Reply-To: <20180320170234.1412-1-martin@omnibond.com> References: <20180320170234.1412-1-martin@omnibond.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: When an inode is created, we fetch attributes from the server. There is no need to turn around and invalidate them. No need to initialize attributes after the getattr either. Either it'll be exactly the same, or it'll be something else and wrong. Signed-off-by: Martin Brandenburg --- fs/orangefs/inode.c | 6 ------ fs/orangefs/namei.c | 6 ------ 2 files changed, 12 deletions(-) diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c index bfd3add254c1..109bdd101e04 100644 --- a/fs/orangefs/inode.c +++ b/fs/orangefs/inode.c @@ -448,12 +448,6 @@ struct inode *orangefs_new_inode(struct super_block *sb, struct inode *dir, goto out_iput; orangefs_init_iops(inode); - - inode->i_mode = mode; - inode->i_uid = current_fsuid(); - inode->i_gid = current_fsgid(); - inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode); - inode->i_size = PAGE_SIZE; inode->i_rdev = dev; error = insert_inode_locked4(inode, hash, orangefs_test_inode, ref); diff --git a/fs/orangefs/namei.c b/fs/orangefs/namei.c index 7dfdf6ad15f6..8f1c6e6d3ee1 100644 --- a/fs/orangefs/namei.c +++ b/fs/orangefs/namei.c @@ -77,8 +77,6 @@ static int orangefs_create(struct inode *dir, d_instantiate(dentry, inode); unlock_new_inode(inode); orangefs_set_timeout(dentry); - ORANGEFS_I(inode)->getattr_time = jiffies - 1; - ORANGEFS_I(inode)->getattr_mask = STATX_BASIC_STATS; gossip_debug(GOSSIP_NAME_DEBUG, "%s: dentry instantiated for %pd\n", @@ -333,8 +331,6 @@ static int orangefs_symlink(struct inode *dir, d_instantiate(dentry, inode); unlock_new_inode(inode); orangefs_set_timeout(dentry); - ORANGEFS_I(inode)->getattr_time = jiffies - 1; - ORANGEFS_I(inode)->getattr_mask = STATX_BASIC_STATS; gossip_debug(GOSSIP_NAME_DEBUG, "Inode (Symlink) %pU -> %pd\n", @@ -403,8 +399,6 @@ static int orangefs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode d_instantiate(dentry, inode); unlock_new_inode(inode); orangefs_set_timeout(dentry); - ORANGEFS_I(inode)->getattr_time = jiffies - 1; - ORANGEFS_I(inode)->getattr_mask = STATX_BASIC_STATS; gossip_debug(GOSSIP_NAME_DEBUG, "Inode (Directory) %pU -> %pd\n", -- 2.16.2