All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: chendt <chendt.fnst@cn.fujitsu.com>
Cc: kbuild-all@01.org, linux-nfs@vger.kernel.org,
	Trond Myklebust <trond.myklebust@primarydata.com>
Subject: Re: [PATCH] NFSv3/acl: forget acl cache after setattr
Date: Thu, 29 Mar 2018 19:39:54 +0800	[thread overview]
Message-ID: <201803291832.EDOBXQIz%fengguang.wu@intel.com> (raw)
In-Reply-To: <ca4d7366-bc4c-1710-13a2-f99510c53be4@cn.fujitsu.com>

[-- Attachment #1: Type: text/plain, Size: 12187 bytes --]

Hi chendt,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on nfs/linux-next]
[also build test WARNING on v4.16-rc7 next-20180328]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/chendt/NFSv3-acl-forget-acl-cache-after-setattr/20180329-173503
base:   git://git.linux-nfs.org/projects/trondmy/linux-nfs.git linux-next
config: x86_64-randconfig-x019-201812 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   In file included from include/asm-generic/bug.h:5:0,
                    from arch/x86/include/asm/bug.h:83,
                    from include/linux/bug.h:5,
                    from include/linux/mmdebug.h:5,
                    from include/linux/mm.h:9,
                    from fs/nfs/nfs3proc.c:10:
   fs/nfs/nfs3proc.c: In function 'nfs3_proc_setattr':
   include/linux/compiler.h:58:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
     ^
   include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
>> fs/nfs/nfs3proc.c:141:2: note: in expansion of macro 'if'
     if (status == 0)
     ^~
   fs/nfs/nfs3proc.c:143:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
      forget_all_cached_acls(inode);
      ^~~~~~~~~~~~~~~~~~~~~~

vim +/if +141 fs/nfs/nfs3proc.c

^1da177e4 Linus Torvalds      2005-04-16  @10  #include <linux/mm.h>
^1da177e4 Linus Torvalds      2005-04-16   11  #include <linux/errno.h>
^1da177e4 Linus Torvalds      2005-04-16   12  #include <linux/string.h>
^1da177e4 Linus Torvalds      2005-04-16   13  #include <linux/sunrpc/clnt.h>
5a0e3ad6a Tejun Heo           2010-03-24   14  #include <linux/slab.h>
^1da177e4 Linus Torvalds      2005-04-16   15  #include <linux/nfs.h>
^1da177e4 Linus Torvalds      2005-04-16   16  #include <linux/nfs3.h>
^1da177e4 Linus Torvalds      2005-04-16   17  #include <linux/nfs_fs.h>
^1da177e4 Linus Torvalds      2005-04-16   18  #include <linux/nfs_page.h>
^1da177e4 Linus Torvalds      2005-04-16   19  #include <linux/lockd/bind.h>
b7fa0554c Andreas Gruenbacher 2005-06-22   20  #include <linux/nfs_mount.h>
d310310cb Jeff Layton         2011-12-01   21  #include <linux/freezer.h>
0a6be6555 Tejun Heo           2014-02-03   22  #include <linux/xattr.h>
^1da177e4 Linus Torvalds      2005-04-16   23  
006ea73e5 Chuck Lever         2006-03-20   24  #include "iostat.h"
f7b422b17 David Howells       2006-06-09   25  #include "internal.h"
00a36a109 Anna Schumaker      2014-09-03   26  #include "nfs3_fs.h"
006ea73e5 Chuck Lever         2006-03-20   27  
^1da177e4 Linus Torvalds      2005-04-16   28  #define NFSDBG_FACILITY		NFSDBG_PROC
^1da177e4 Linus Torvalds      2005-04-16   29  
eb96d5c97 Andy Adamson        2012-11-27   30  /* A wrapper to handle the EJUKEBOX error messages */
^1da177e4 Linus Torvalds      2005-04-16   31  static int
^1da177e4 Linus Torvalds      2005-04-16   32  nfs3_rpc_wrapper(struct rpc_clnt *clnt, struct rpc_message *msg, int flags)
^1da177e4 Linus Torvalds      2005-04-16   33  {
^1da177e4 Linus Torvalds      2005-04-16   34  	int res;
^1da177e4 Linus Torvalds      2005-04-16   35  	do {
^1da177e4 Linus Torvalds      2005-04-16   36  		res = rpc_call_sync(clnt, msg, flags);
eb96d5c97 Andy Adamson        2012-11-27   37  		if (res != -EJUKEBOX)
^1da177e4 Linus Torvalds      2005-04-16   38  			break;
416ad3c9c Colin Cross         2013-05-06   39  		freezable_schedule_timeout_killable_unsafe(NFS_JUKEBOX_RETRY_TIME);
^1da177e4 Linus Torvalds      2005-04-16   40  		res = -ERESTARTSYS;
150030b78 Matthew Wilcox      2007-12-06   41  	} while (!fatal_signal_pending(current));
^1da177e4 Linus Torvalds      2005-04-16   42  	return res;
^1da177e4 Linus Torvalds      2005-04-16   43  }
^1da177e4 Linus Torvalds      2005-04-16   44  
dead28da8 Chuck Lever         2006-03-20   45  #define rpc_call_sync(clnt, msg, flags)	nfs3_rpc_wrapper(clnt, msg, flags)
^1da177e4 Linus Torvalds      2005-04-16   46  
^1da177e4 Linus Torvalds      2005-04-16   47  static int
006ea73e5 Chuck Lever         2006-03-20   48  nfs3_async_handle_jukebox(struct rpc_task *task, struct inode *inode)
^1da177e4 Linus Torvalds      2005-04-16   49  {
eb96d5c97 Andy Adamson        2012-11-27   50  	if (task->tk_status != -EJUKEBOX)
^1da177e4 Linus Torvalds      2005-04-16   51  		return 0;
b68d69b8c Jeff Layton         2010-01-07   52  	if (task->tk_status == -EJUKEBOX)
006ea73e5 Chuck Lever         2006-03-20   53  		nfs_inc_stats(inode, NFSIOS_DELAY);
^1da177e4 Linus Torvalds      2005-04-16   54  	task->tk_status = 0;
^1da177e4 Linus Torvalds      2005-04-16   55  	rpc_restart_call(task);
^1da177e4 Linus Torvalds      2005-04-16   56  	rpc_delay(task, NFS_JUKEBOX_RETRY_TIME);
^1da177e4 Linus Torvalds      2005-04-16   57  	return 1;
^1da177e4 Linus Torvalds      2005-04-16   58  }
^1da177e4 Linus Torvalds      2005-04-16   59  
^1da177e4 Linus Torvalds      2005-04-16   60  static int
03c217339 J. Bruce Fields     2006-01-03   61  do_proc_get_root(struct rpc_clnt *client, struct nfs_fh *fhandle,
^1da177e4 Linus Torvalds      2005-04-16   62  		 struct nfs_fsinfo *info)
^1da177e4 Linus Torvalds      2005-04-16   63  {
dead28da8 Chuck Lever         2006-03-20   64  	struct rpc_message msg = {
dead28da8 Chuck Lever         2006-03-20   65  		.rpc_proc	= &nfs3_procedures[NFS3PROC_FSINFO],
dead28da8 Chuck Lever         2006-03-20   66  		.rpc_argp	= fhandle,
dead28da8 Chuck Lever         2006-03-20   67  		.rpc_resp	= info,
dead28da8 Chuck Lever         2006-03-20   68  	};
^1da177e4 Linus Torvalds      2005-04-16   69  	int	status;
^1da177e4 Linus Torvalds      2005-04-16   70  
3110ff804 Harvey Harrison     2008-05-02   71  	dprintk("%s: call  fsinfo\n", __func__);
0e574af1b Trond Myklebust     2005-10-27   72  	nfs_fattr_init(info->fattr);
dead28da8 Chuck Lever         2006-03-20   73  	status = rpc_call_sync(client, &msg, 0);
3110ff804 Harvey Harrison     2008-05-02   74  	dprintk("%s: reply fsinfo: %d\n", __func__, status);
086600430 Trond Myklebust     2012-08-20   75  	if (status == 0 && !(info->fattr->valid & NFS_ATTR_FATTR)) {
dead28da8 Chuck Lever         2006-03-20   76  		msg.rpc_proc = &nfs3_procedures[NFS3PROC_GETATTR];
dead28da8 Chuck Lever         2006-03-20   77  		msg.rpc_resp = info->fattr;
dead28da8 Chuck Lever         2006-03-20   78  		status = rpc_call_sync(client, &msg, 0);
3110ff804 Harvey Harrison     2008-05-02   79  		dprintk("%s: reply getattr: %d\n", __func__, status);
^1da177e4 Linus Torvalds      2005-04-16   80  	}
^1da177e4 Linus Torvalds      2005-04-16   81  	return status;
^1da177e4 Linus Torvalds      2005-04-16   82  }
^1da177e4 Linus Torvalds      2005-04-16   83  
^1da177e4 Linus Torvalds      2005-04-16   84  /*
54ceac451 David Howells       2006-08-22   85   * Bare-bones access to getattr: this is for nfs_get_root/nfs_get_sb
03c217339 J. Bruce Fields     2006-01-03   86   */
03c217339 J. Bruce Fields     2006-01-03   87  static int
03c217339 J. Bruce Fields     2006-01-03   88  nfs3_proc_get_root(struct nfs_server *server, struct nfs_fh *fhandle,
03c217339 J. Bruce Fields     2006-01-03   89  		   struct nfs_fsinfo *info)
03c217339 J. Bruce Fields     2006-01-03   90  {
03c217339 J. Bruce Fields     2006-01-03   91  	int	status;
03c217339 J. Bruce Fields     2006-01-03   92  
03c217339 J. Bruce Fields     2006-01-03   93  	status = do_proc_get_root(server->client, fhandle, info);
5006a76cc David Howells       2006-08-22   94  	if (status && server->nfs_client->cl_rpcclient != server->client)
5006a76cc David Howells       2006-08-22   95  		status = do_proc_get_root(server->nfs_client->cl_rpcclient, fhandle, info);
03c217339 J. Bruce Fields     2006-01-03   96  	return status;
03c217339 J. Bruce Fields     2006-01-03   97  }
03c217339 J. Bruce Fields     2006-01-03   98  
03c217339 J. Bruce Fields     2006-01-03   99  /*
^1da177e4 Linus Torvalds      2005-04-16  100   * One function for each procedure in the NFS protocol.
^1da177e4 Linus Torvalds      2005-04-16  101   */
^1da177e4 Linus Torvalds      2005-04-16  102  static int
^1da177e4 Linus Torvalds      2005-04-16  103  nfs3_proc_getattr(struct nfs_server *server, struct nfs_fh *fhandle,
1775fd3e8 David Quigley       2013-05-22  104  		struct nfs_fattr *fattr, struct nfs4_label *label)
^1da177e4 Linus Torvalds      2005-04-16  105  {
dead28da8 Chuck Lever         2006-03-20  106  	struct rpc_message msg = {
dead28da8 Chuck Lever         2006-03-20  107  		.rpc_proc	= &nfs3_procedures[NFS3PROC_GETATTR],
dead28da8 Chuck Lever         2006-03-20  108  		.rpc_argp	= fhandle,
dead28da8 Chuck Lever         2006-03-20  109  		.rpc_resp	= fattr,
dead28da8 Chuck Lever         2006-03-20  110  	};
^1da177e4 Linus Torvalds      2005-04-16  111  	int	status;
^1da177e4 Linus Torvalds      2005-04-16  112  
^1da177e4 Linus Torvalds      2005-04-16  113  	dprintk("NFS call  getattr\n");
0e574af1b Trond Myklebust     2005-10-27  114  	nfs_fattr_init(fattr);
dead28da8 Chuck Lever         2006-03-20  115  	status = rpc_call_sync(server->client, &msg, 0);
^1da177e4 Linus Torvalds      2005-04-16  116  	dprintk("NFS reply getattr: %d\n", status);
^1da177e4 Linus Torvalds      2005-04-16  117  	return status;
^1da177e4 Linus Torvalds      2005-04-16  118  }
^1da177e4 Linus Torvalds      2005-04-16  119  
^1da177e4 Linus Torvalds      2005-04-16  120  static int
^1da177e4 Linus Torvalds      2005-04-16  121  nfs3_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr,
^1da177e4 Linus Torvalds      2005-04-16  122  			struct iattr *sattr)
^1da177e4 Linus Torvalds      2005-04-16  123  {
2b0143b5c David Howells       2015-03-17  124  	struct inode *inode = d_inode(dentry);
^1da177e4 Linus Torvalds      2005-04-16  125  	struct nfs3_sattrargs	arg = {
^1da177e4 Linus Torvalds      2005-04-16  126  		.fh		= NFS_FH(inode),
^1da177e4 Linus Torvalds      2005-04-16  127  		.sattr		= sattr,
^1da177e4 Linus Torvalds      2005-04-16  128  	};
dead28da8 Chuck Lever         2006-03-20  129  	struct rpc_message msg = {
dead28da8 Chuck Lever         2006-03-20  130  		.rpc_proc	= &nfs3_procedures[NFS3PROC_SETATTR],
dead28da8 Chuck Lever         2006-03-20  131  		.rpc_argp	= &arg,
dead28da8 Chuck Lever         2006-03-20  132  		.rpc_resp	= fattr,
dead28da8 Chuck Lever         2006-03-20  133  	};
^1da177e4 Linus Torvalds      2005-04-16  134  	int	status;
^1da177e4 Linus Torvalds      2005-04-16  135  
^1da177e4 Linus Torvalds      2005-04-16  136  	dprintk("NFS call  setattr\n");
659bfcd6d Trond Myklebust     2008-06-10  137  	if (sattr->ia_valid & ATTR_FILE)
659bfcd6d Trond Myklebust     2008-06-10  138  		msg.rpc_cred = nfs_file_cred(sattr->ia_file);
0e574af1b Trond Myklebust     2005-10-27  139  	nfs_fattr_init(fattr);
dead28da8 Chuck Lever         2006-03-20  140  	status = rpc_call_sync(NFS_CLIENT(inode), &msg, 0);
65e4308d2 Trond Myklebust     2005-08-16 @141  	if (status == 0)
f044636d9 Trond Myklebust     2015-02-26  142  		nfs_setattr_update_inode(inode, sattr, fattr);
34de94ef5 chendt              2018-03-28  143  		forget_all_cached_acls(inode);
^1da177e4 Linus Torvalds      2005-04-16  144  	dprintk("NFS reply setattr: %d\n", status);
^1da177e4 Linus Torvalds      2005-04-16  145  	return status;
^1da177e4 Linus Torvalds      2005-04-16  146  }
^1da177e4 Linus Torvalds      2005-04-16  147  

:::::: The code at line 141 was first introduced by commit
:::::: 65e4308d2500e7daf60c3dccc202c61ffb066c63 [PATCH] NFS: Ensure we always update inode->i_mode when doing O_EXCL creates

:::::: TO: Trond Myklebust <Trond.Myklebust@netapp.com>
:::::: CC: Linus Torvalds <torvalds@g5.osdl.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 30041 bytes --]

      parent reply	other threads:[~2018-03-29 11:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-28 10:12 [PATCH] NFSv3/acl: forget acl cache after setattr chendt
2018-03-28 20:48 ` Benjamin Coddington
2018-03-29  6:01 ` [PATCH v2] " chendt
2018-03-29  6:47   ` Kinglong Mee
2018-03-29  8:13 ` [PATCH v3] " chendt
2018-03-29 10:07 ` [PATCH] " kbuild test robot
2018-03-29 11:39 ` kbuild test robot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201803291832.EDOBXQIz%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=chendt.fnst@cn.fujitsu.com \
    --cc=kbuild-all@01.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trond.myklebust@primarydata.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.