Return-Path: Received: from mail-wm0-f54.google.com ([74.125.82.54]:45922 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751585AbdITIkN (ORCPT ); Wed, 20 Sep 2017 04:40:13 -0400 Received: by mail-wm0-f54.google.com with SMTP id g206so5039691wme.0 for ; Wed, 20 Sep 2017 01:40:12 -0700 (PDT) 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> In-Reply-To: <1505896805-12055-1-git-send-email-mszeredi@redhat.com> References: <1505896805-12055-1-git-send-email-mszeredi@redhat.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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