Re: [PATCH v4 20/20] NFSv4: Fix a race when updating an open_stateid

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

 



Hi Trond,

[auto build test WARNING on nfs/linux-next]
[also build test WARNING on v4.8-rc6 next-20160915]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
[Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on]
[Check https://git-scm.com/docs/git-format-patch for more information]

url:    https://github.com/0day-ci/linux/commits/Trond-Myklebust/Fix-delegation-behaviour-when-server-revokes-some-state/20160916-050650
base:   git://git.linux-nfs.org/projects/trondmy/linux-nfs.git linux-next
config: m68k-sun3_defconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 4.9.0
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=m68k 

All warnings (new ones prefixed by >>):

   fs/nfs/nfs4proc.c: In function 'update_open_stateid':
>> fs/nfs/nfs4proc.c:1524:2: warning: missing braces around initializer [-Wmissing-braces]
     nfs4_stateid freeme = {0};
     ^
   fs/nfs/nfs4proc.c:1524:2: warning: (near initialization for 'freeme.<anonymous>') [-Wmissing-braces]

vim +1524 fs/nfs/nfs4proc.c

  1508		if (open_stateid != NULL)
  1509			nfs_set_open_stateid_locked(state, open_stateid, fmode, freeme);
  1510		write_sequnlock(&state->seqlock);
  1511		update_open_stateflags(state, fmode);
  1512		spin_unlock(&state->owner->so_lock);
  1513	}
  1514	
  1515	static int update_open_stateid(struct nfs4_state *state,
  1516			const nfs4_stateid *open_stateid,
  1517			const nfs4_stateid *delegation,
  1518			fmode_t fmode)
  1519	{
  1520		struct nfs_server *server = NFS_SERVER(state->inode);
  1521		struct nfs_client *clp = server->nfs_client;
  1522		struct nfs_inode *nfsi = NFS_I(state->inode);
  1523		struct nfs_delegation *deleg_cur;
> 1524		nfs4_stateid freeme = {0};
  1525		int ret = 0;
  1526	
  1527		fmode &= (FMODE_READ|FMODE_WRITE);
  1528	
  1529		rcu_read_lock();
  1530		deleg_cur = rcu_dereference(nfsi->delegation);
  1531		if (deleg_cur == NULL)
  1532			goto no_delegation;

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

Attachment: .config.gz
Description: Binary data


[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