From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com ([192.55.52.43]:27474 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751278AbeDFJER (ORCPT ); Fri, 6 Apr 2018 05:04:17 -0400 Date: Fri, 6 Apr 2018 17:03:50 +0800 From: kbuild test robot To: Amir Goldstein Cc: kbuild-all@01.org, Jan Kara , Miklos Szeredi , Marko Rauhamaa , linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v2 15/20] fsnotify: make fsnotify_recalc_mask() unaware of object type Message-ID: <201804061651.NoR8n2Vg%fengguang.wu@intel.com> References: <1522934301-6520-16-git-send-email-amir73il@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1522934301-6520-16-git-send-email-amir73il@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Hi Amir, I love your patch! Perhaps something to improve: [auto build test WARNING on v4.16] [cannot apply to linus/master next-20180405] [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/Amir-Goldstein/fanotify-super-block-mark/20180406-132931 reproduce: # apt-get install sparse make ARCH=x86_64 allmodconfig make C=1 CF=-D__CHECK_ENDIAN__ sparse warnings: (new ones prefixed by >>) fs/notify/mark.c:94:19: sparse: symbol 'fsnotify_mark_connector_cachep' was not declared. Should it be static? >> fs/notify/mark.c:114:51: sparse: incorrect type in initializer (different address spaces) @@ expected struct fsnotify_mark_connector *conn @@ got struct fsnotify_mstruct fsnotify_mark_connector *conn @@ fs/notify/mark.c:114:51: expected struct fsnotify_mark_connector *conn fs/notify/mark.c:114:51: got struct fsnotify_mark_connector [noderef] *marks fs/notify/mark.c:147:51: sparse: incorrect type in initializer (different address spaces) @@ expected struct fsnotify_mark_connector *conn @@ got struct fsnotify_mstruct fsnotify_mark_connector *conn @@ fs/notify/mark.c:147:51: expected struct fsnotify_mark_connector *conn fs/notify/mark.c:147:51: got struct fsnotify_mark_connector [noderef] *marks fs/notify/mark.c:472:13: sparse: incorrect type in initializer (different address spaces) @@ expected struct fsnotify_mark_connector [noderef] *__new @@ got fsnotify_mark_connector [noderef] *__new @@ fs/notify/mark.c:472:13: expected struct fsnotify_mark_connector [noderef] *__new fs/notify/mark.c:472:13: got struct fsnotify_mark_connector *[assigned] conn fs/notify/mark.c:237:9: sparse: context imbalance in 'fsnotify_put_mark' - unexpected unlock fs/notify/mark.c:323:25: sparse: context imbalance in 'fsnotify_prepare_user_wait' - unexpected unlock fs/notify/mark.c:338:9: sparse: context imbalance in 'fsnotify_finish_user_wait' - wrong count at exit fs/notify/mark.c:488:39: sparse: context imbalance in 'fsnotify_grab_connector' - different lock contexts for basic block fs/notify/mark.c:567:20: sparse: context imbalance in 'fsnotify_add_mark_list' - unexpected unlock fs/notify/mark.c:649:25: sparse: context imbalance in 'fsnotify_find_mark' - unexpected unlock fs/notify/mark.c:721:17: sparse: context imbalance in 'fsnotify_destroy_marks' - unexpected unlock vim +114 fs/notify/mark.c 92 93 struct srcu_struct fsnotify_mark_srcu; > 94 struct kmem_cache *fsnotify_mark_connector_cachep; 95 96 static DEFINE_SPINLOCK(destroy_lock); 97 static LIST_HEAD(destroy_list); 98 static struct fsnotify_mark_connector *connector_destroy_list; 99 100 static void fsnotify_mark_destroy_workfn(struct work_struct *work); 101 static DECLARE_DELAYED_WORK(reaper_work, fsnotify_mark_destroy_workfn); 102 103 static void fsnotify_connector_destroy_workfn(struct work_struct *work); 104 static DECLARE_WORK(connector_reaper_work, fsnotify_connector_destroy_workfn); 105 106 void fsnotify_get_mark(struct fsnotify_mark *mark) 107 { 108 WARN_ON_ONCE(!refcount_read(&mark->refcnt)); 109 refcount_inc(&mark->refcnt); 110 } 111 112 static void __fsnotify_recalc_mask(struct fsnotify_obj *obj) 113 { > 114 struct fsnotify_mark_connector *conn = obj->marks; 115 u32 new_mask = 0; 116 struct fsnotify_mark *mark; 117 118 assert_spin_locked(&conn->lock); 119 hlist_for_each_entry(mark, &conn->list, obj_list) { 120 if (mark->flags & FSNOTIFY_MARK_FLAG_ATTACHED) 121 new_mask |= mark->mask; 122 } 123 obj->mask = new_mask; 124 } 125 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation