Re: cifs: remove all cifs files before kill super

kernel test robot <[email protected]> Tue, 26 May 2026 07:04:02 +0800
Newsgroups gmane.linux.kernel,gmane.linux.kernel.cifs,gmane.network.samba.internals
Message-ID <[email protected]>
Hi zhangjian,

kernel test robot noticed the following build warnings:

[auto build test WARNING on cifs/for-next]
[also build test WARNING on linus/master v7.1-rc5 next-20260525]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/zhangjian-CG/cifs-remove-all-cifs-files-before-kill-super/20260519-185913
base:   git://git.samba.org/sfrench/cifs-2.6.git for-next
patch link:    https://lore.kernel.org/r/616cbc26-d8a9-418a-91f3-11e470087aa4%40huawei.com
patch subject: cifs: remove all cifs files before kill super
config: x86_64-randconfig-161 (https://download.01.org/0day-ci/archive/20260526/[email protected]/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
smatch: v0.5.0-9185-gbcc58b9c

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

New smatch warnings:
fs/smb/client/connect.c:3999 cifs_umount() warn: inconsistent indenting

Old smatch warnings:
fs/smb/client/connect.c:3369 generic_ip_connect() error: we previously assumed 'server->ssocket' could be null (see line 3356)

vim +3999 fs/smb/client/connect.c

  3966	
  3967	void
  3968	cifs_umount(struct cifs_sb_info *cifs_sb)
  3969	{
  3970		struct rb_root *root = &cifs_sb->tlink_tree;
  3971		struct rb_node *node;
  3972		struct tcon_link *tlink;
  3973		struct cifs_tcon *tcon = NULL;
  3974	
  3975		cancel_delayed_work_sync(&cifs_sb->prune_tlinks);
  3976	
  3977		if (cifs_sb->master_tlink) {
  3978			tcon = cifs_sb->master_tlink->tl_tcon;
  3979			if (tcon) {
  3980				spin_lock(&tcon->sb_list_lock);
  3981				list_del_init(&cifs_sb->tcon_sb_link);
  3982				spin_unlock(&tcon->sb_list_lock);
  3983			}
  3984		}
  3985	
  3986		spin_lock(&cifs_sb->tlink_tree_lock);
  3987		while ((node = rb_first(root))) {
  3988			tlink = rb_entry(node, struct tcon_link, tl_rbnode);
  3989			cifs_get_tlink(tlink);
  3990			clear_bit(TCON_LINK_IN_TREE, &tlink->tl_flags);
  3991			rb_erase(node, root);
  3992	
  3993			spin_unlock(&cifs_sb->tlink_tree_lock);
  3994			cifs_put_tlink(tlink);
  3995			spin_lock(&cifs_sb->tlink_tree_lock);
  3996		}
  3997		spin_unlock(&cifs_sb->tlink_tree_lock);
  3998	
> 3999	    flush_workqueue(serverclose_wq);
  4000	    flush_workqueue(fileinfo_put_wq);
  4001	
  4002		kfree(cifs_sb->prepath);
  4003		call_rcu(&cifs_sb->rcu, delayed_free);
  4004	}
  4005	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki