Re: [PATCH] NFSv3/acl: forget acl cache after setattr

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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-x010-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 >>):

   fs/nfs/nfs3proc.c: In function 'nfs3_proc_setattr':
>> fs/nfs/nfs3proc.c:141:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
     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

^1da177e Linus Torvalds  2005-04-16  119  
^1da177e Linus Torvalds  2005-04-16  120  static int
^1da177e Linus Torvalds  2005-04-16  121  nfs3_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr,
^1da177e Linus Torvalds  2005-04-16  122  			struct iattr *sattr)
^1da177e Linus Torvalds  2005-04-16  123  {
2b0143b5 David Howells   2015-03-17  124  	struct inode *inode = d_inode(dentry);
^1da177e Linus Torvalds  2005-04-16  125  	struct nfs3_sattrargs	arg = {
^1da177e Linus Torvalds  2005-04-16  126  		.fh		= NFS_FH(inode),
^1da177e Linus Torvalds  2005-04-16  127  		.sattr		= sattr,
^1da177e Linus Torvalds  2005-04-16  128  	};
dead28da Chuck Lever     2006-03-20  129  	struct rpc_message msg = {
dead28da Chuck Lever     2006-03-20  130  		.rpc_proc	= &nfs3_procedures[NFS3PROC_SETATTR],
dead28da Chuck Lever     2006-03-20  131  		.rpc_argp	= &arg,
dead28da Chuck Lever     2006-03-20  132  		.rpc_resp	= fattr,
dead28da Chuck Lever     2006-03-20  133  	};
^1da177e Linus Torvalds  2005-04-16  134  	int	status;
^1da177e Linus Torvalds  2005-04-16  135  
^1da177e Linus Torvalds  2005-04-16  136  	dprintk("NFS call  setattr\n");
659bfcd6 Trond Myklebust 2008-06-10  137  	if (sattr->ia_valid & ATTR_FILE)
659bfcd6 Trond Myklebust 2008-06-10  138  		msg.rpc_cred = nfs_file_cred(sattr->ia_file);
0e574af1 Trond Myklebust 2005-10-27  139  	nfs_fattr_init(fattr);
dead28da Chuck Lever     2006-03-20  140  	status = rpc_call_sync(NFS_CLIENT(inode), &msg, 0);
65e4308d Trond Myklebust 2005-08-16 @141  	if (status == 0)
f044636d Trond Myklebust 2015-02-26  142  		nfs_setattr_update_inode(inode, sattr, fattr);
34de94ef chendt          2018-03-28  143  		forget_all_cached_acls(inode);
^1da177e Linus Torvalds  2005-04-16  144  	dprintk("NFS reply setattr: %d\n", status);
^1da177e Linus Torvalds  2005-04-16  145  	return status;
^1da177e Linus Torvalds  2005-04-16  146  }
^1da177e 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@xxxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux