All of lore.kernel.org
 help / color / mirror / Atom feed
* [amir73il:fsnotify-volatile 5/7] fs/notify/mark.c:709 fsnotify_add_mark_locked() warn: inconsistent indenting
@ 2022-03-20  0:28 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-03-20  0:28 UTC (permalink / raw)
  To: Amir Goldstein; +Cc: kbuild-all, linux-kernel

tree:   https://github.com/amir73il/linux fsnotify-volatile
head:   e477fc13ce51d96938aad656c53ca0a0e5dcc2be
commit: a41876bc2624aea256c40c2b3d7eff7fef383323 [5/7] fsnotify: allow adding an inode mark without pinning inode
config: x86_64-randconfig-m001 (https://download.01.org/0day-ci/archive/20220320/202203200859.BcodfXSo-lkp@intel.com/config)
compiler: gcc-9 (Ubuntu 9.4.0-1ubuntu1~20.04) 9.4.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

smatch warnings:
fs/notify/mark.c:709 fsnotify_add_mark_locked() warn: inconsistent indenting

vim +709 fs/notify/mark.c

   677	
   678	/*
   679	 * Attach an initialized mark to a given group and fs object.
   680	 * These marks may be used for the fsnotify backend to determine which
   681	 * event types should be delivered to which group.
   682	 */
   683	int fsnotify_add_mark_locked(struct fsnotify_mark *mark,
   684				     fsnotify_connp_t *connp, unsigned int obj_type,
   685				     int flags, __kernel_fsid_t *fsid)
   686	{
   687		struct fsnotify_group *group = mark->group;
   688		int ret = 0;
   689	
   690		BUG_ON(!mutex_is_locked(&group->mark_mutex));
   691	
   692		/*
   693		 * LOCKING ORDER!!!!
   694		 * group->mark_mutex
   695		 * mark->lock
   696		 * mark->connector->lock
   697		 */
   698		spin_lock(&mark->lock);
   699		mark->flags |= FSNOTIFY_MARK_FLAG_ALIVE | FSNOTIFY_MARK_FLAG_ATTACHED;
   700	
   701		list_add(&mark->g_list, &group->marks_list);
   702		fsnotify_get_mark(mark); /* for g_list */
   703		spin_unlock(&mark->lock);
   704	
   705		ret = fsnotify_add_mark_list(mark, connp, obj_type, flags, fsid);
   706		if (ret)
   707			goto err;
   708	
 > 709	       if (obj_type == FSNOTIFY_OBJ_TYPE_INODE &&
   710	           !(flags & FSNOTIFY_ADD_MARK_NO_IREF))
   711	               mark->flags |= FSNOTIFY_MARK_FLAG_WANT_IREF;
   712	
   713	       fsnotify_recalc_mask(mark->connector);
   714	
   715		return ret;
   716	err:
   717		spin_lock(&mark->lock);
   718		mark->flags &= ~(FSNOTIFY_MARK_FLAG_ALIVE |
   719				 FSNOTIFY_MARK_FLAG_ATTACHED);
   720		list_del_init(&mark->g_list);
   721		spin_unlock(&mark->lock);
   722	
   723		fsnotify_put_mark(mark);
   724		return ret;
   725	}
   726	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-03-20  0:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-20  0:28 [amir73il:fsnotify-volatile 5/7] fs/notify/mark.c:709 fsnotify_add_mark_locked() warn: inconsistent indenting kernel test robot

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.