Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751763AbdITInV (ORCPT ); Wed, 20 Sep 2017 04:43:21 -0400 Received: from mail-wm0-f51.google.com ([74.125.82.51]:47558 "EHLO mail-wm0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751584AbdITIkN (ORCPT ); Wed, 20 Sep 2017 04:40:13 -0400 X-Google-Smtp-Source: AOwi7QCKF20pSKeQOxjZP8D4POWrxPLCc+M58mxx3XkzIbl1vwP4qEHKTjWPfNgF8Uf6rmX5b3yGXw== From: Miklos Szeredi To: linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Al Viro , David Howells , Jan Harkes Subject: [PATCH 03/10] coda: honor AT_STATX_DONT_SYNC Date: Wed, 20 Sep 2017 10:39:58 +0200 Message-Id: <1505896805-12055-4-git-send-email-mszeredi@redhat.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1505896805-12055-1-git-send-email-mszeredi@redhat.com> References: <1505896805-12055-1-git-send-email-mszeredi@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 939 Lines: 28 The description of this flag says "Don't sync attributes with the server". In other words: always use the attributes cached in the kernel and don't send network or local messages to refresh the attributes. Signed-off-by: Miklos Szeredi Cc: Jan Harkes --- fs/coda/inode.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fs/coda/inode.c b/fs/coda/inode.c index 6058df380cc0..734672b2cbdc 100644 --- a/fs/coda/inode.c +++ b/fs/coda/inode.c @@ -255,7 +255,10 @@ static void coda_evict_inode(struct inode *inode) int coda_getattr(const struct path *path, struct kstat *stat, u32 request_mask, unsigned int flags) { - int err = coda_revalidate_inode(d_inode(path->dentry)); + int err = 0; + + if (!(flags & AT_STATX_DONT_SYNC)) + err = coda_revalidate_inode(d_inode(path->dentry)); if (!err) generic_fillattr(d_inode(path->dentry), stat); return err; -- 2.5.5