diff for duplicates of <202205080346.m0fb3UXK-lkp@intel.com> diff --git a/a/1.txt b/N1/1.txt index 828e25e..8270d46 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -1,13 +1,6 @@ -CC: kbuild-all(a)lists.01.org -BCC: lkp(a)intel.com -CC: linux-kernel(a)vger.kernel.org -TO: Amir Goldstein <amir73il@gmail.com> - tree: https://github.com/amir73il/linux fsnotify-fixes head: d25f3ce8da49ce1a3b0a0621f0bf7b1d6ba2dad6 commit: d25f3ce8da49ce1a3b0a0621f0bf7b1d6ba2dad6 [2/2] fsnotify: send FS_RENAME to groups watching the moved inode -:::::: branch date: 4 hours ago -:::::: commit date: 4 hours ago config: s390-randconfig-m031-20220508 (https://download.01.org/0day-ci/archive/20220508/202205080346.m0fb3UXK-lkp(a)intel.com/config) compiler: s390-linux-gcc (GCC) 11.3.0 @@ -20,27 +13,6 @@ fs/notify/fsnotify.c:540 fsnotify() warn: variable dereferenced before check 'di vim +/dir1 +540 fs/notify/fsnotify.c -d9a6f30bb89309 Amir Goldstein 2018-04-20 454 -90586523eb4b34 Eric Paris 2009-05-21 455 /* -40a100d3adc1ad Amir Goldstein 2020-07-22 456 * fsnotify - This is the main call to fsnotify. -40a100d3adc1ad Amir Goldstein 2020-07-22 457 * -40a100d3adc1ad Amir Goldstein 2020-07-22 458 * The VFS calls into hook specific functions in linux/fsnotify.h. -40a100d3adc1ad Amir Goldstein 2020-07-22 459 * Those functions then in turn call here. Here will call out to all of the -40a100d3adc1ad Amir Goldstein 2020-07-22 460 * registered fsnotify_group. Those groups can then use the notification event -40a100d3adc1ad Amir Goldstein 2020-07-22 461 * in whatever means they feel necessary. -40a100d3adc1ad Amir Goldstein 2020-07-22 462 * -40a100d3adc1ad Amir Goldstein 2020-07-22 463 * @mask: event type and flags -40a100d3adc1ad Amir Goldstein 2020-07-22 464 * @data: object that event happened on -40a100d3adc1ad Amir Goldstein 2020-07-22 465 * @data_type: type of object for fanotify_data_XXX() accessors -40a100d3adc1ad Amir Goldstein 2020-07-22 466 * @dir: optional directory associated with event - -40a100d3adc1ad Amir Goldstein 2020-07-22 467 * if @file_name is not NULL, this is the directory that -40a100d3adc1ad Amir Goldstein 2020-07-22 468 * @file_name is relative to -40a100d3adc1ad Amir Goldstein 2020-07-22 469 * @file_name: optional file name associated with event -40a100d3adc1ad Amir Goldstein 2020-07-22 470 * @inode: optional inode associated with event - -29335033c574a1 Gabriel Krisman Bertazi 2021-10-25 471 * If @dir and @inode are both non-NULL, event may be -29335033c574a1 Gabriel Krisman Bertazi 2021-10-25 472 * reported to both. -40a100d3adc1ad Amir Goldstein 2020-07-22 473 * @cookie: inotify rename cookie -90586523eb4b34 Eric Paris 2009-05-21 474 */ 40a100d3adc1ad Amir Goldstein 2020-07-22 475 int fsnotify(__u32 mask, const void *data, int data_type, struct inode *dir, 40a100d3adc1ad Amir Goldstein 2020-07-22 476 const struct qstr *file_name, struct inode *inode, u32 cookie) 90586523eb4b34 Eric Paris 2009-05-21 477 { @@ -66,6 +38,9 @@ e54183fa7047c1 Amir Goldstein 2021-11-29 496 moved = fsnotify_data_ d25f3ce8da49ce Amir Goldstein 2022-05-07 497 dir1 = moved->d_parent->d_inode; d25f3ce8da49ce Amir Goldstein 2022-05-07 498 dir2 = dir; d25f3ce8da49ce Amir Goldstein 2022-05-07 @499 if (dir1->i_fsnotify_marks || dir2->i_fsnotify_marks) + ^^^^^^^^^^^^^^^^^^^^^^ +Dereference + d25f3ce8da49ce Amir Goldstein 2022-05-07 500 dir1_type = FSNOTIFY_ITER_TYPE_OLD_DIR; d25f3ce8da49ce Amir Goldstein 2022-05-07 501 /* d25f3ce8da49ce Amir Goldstein 2022-05-07 502 * Send FS_RENAME to groups watching the moved inode itself @@ -84,6 +59,9 @@ fecc4559780d52 Amir Goldstein 2020-12-02 513 * watching children a d25f3ce8da49ce Amir Goldstein 2022-05-07 515 dir1 = dir; d25f3ce8da49ce Amir Goldstein 2022-05-07 516 dir2 = NULL; d25f3ce8da49ce Amir Goldstein 2022-05-07 517 if (dir1->i_fsnotify_marks) + ^^^^^^^^^^^^^^^^^^^^^^ +Dereference + d25f3ce8da49ce Amir Goldstein 2022-05-07 518 dir1_type = FSNOTIFY_ITER_TYPE_PARENT; 40a100d3adc1ad Amir Goldstein 2020-07-22 519 } 497b0c5a7c0688 Amir Goldstein 2020-07-16 520 @@ -107,6 +85,11 @@ d25f3ce8da49ce Amir Goldstein 2022-05-07 531 !dir1_type) 9b93f33105f5f9 Amir Goldstein 2020-07-16 538 marks_mask |= inode->i_fsnotify_mask; d25f3ce8da49ce Amir Goldstein 2022-05-07 539 if (dir1_type) { d25f3ce8da49ce Amir Goldstein 2022-05-07 @540 if (dir1) + +If "dir1_type" is set then we have already dereferenced "dir1". I guess +this unnecessary NULL check is something that probably wouldn't bother +a human reader too much... + d25f3ce8da49ce Amir Goldstein 2022-05-07 541 marks_mask |= dir1->i_fsnotify_mask; d25f3ce8da49ce Amir Goldstein 2022-05-07 542 if (dir2) d25f3ce8da49ce Amir Goldstein 2022-05-07 543 marks_mask |= dir2->i_fsnotify_mask; @@ -164,8 +147,6 @@ ff8bcbd03da881 Eric Paris 2010-10-28 593 out: c4ec54b40d33f8 Eric Paris 2009-12-17 595 98b5c10d320adf Jean-Christophe Dubois 2010-03-23 596 return ret; 90586523eb4b34 Eric Paris 2009-05-21 597 } -90586523eb4b34 Eric Paris 2009-05-21 598 EXPORT_SYMBOL_GPL(fsnotify); -90586523eb4b34 Eric Paris 2009-05-21 599 -- 0-DAY CI Kernel Test Service diff --git a/a/content_digest b/N1/content_digest index 06410c5..32f0967 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,19 +1,12 @@ - "From\0kernel test robot <lkp@intel.com>\0" + "From\0Dan Carpenter <dan.carpenter@oracle.com>\0" "Subject\0[amir73il:fsnotify-fixes 2/2] fs/notify/fsnotify.c:540 fsnotify() warn: variable dereferenced before check 'dir1' (see line 499)\0" - "Date\0Sun, 08 May 2022 03:26:49 +0800\0" - "To\0kbuild@lists.01.org\0" + "Date\0Mon, 09 May 2022 13:08:37 +0300\0" + "To\0kbuild-all@lists.01.org\0" "\01:1\0" "b\0" - "CC: kbuild-all(a)lists.01.org\n" - "BCC: lkp(a)intel.com\n" - "CC: linux-kernel(a)vger.kernel.org\n" - "TO: Amir Goldstein <amir73il@gmail.com>\n" - "\n" "tree: https://github.com/amir73il/linux fsnotify-fixes\n" "head: d25f3ce8da49ce1a3b0a0621f0bf7b1d6ba2dad6\n" "commit: d25f3ce8da49ce1a3b0a0621f0bf7b1d6ba2dad6 [2/2] fsnotify: send FS_RENAME to groups watching the moved inode\n" - ":::::: branch date: 4 hours ago\n" - ":::::: commit date: 4 hours ago\n" "config: s390-randconfig-m031-20220508 (https://download.01.org/0day-ci/archive/20220508/202205080346.m0fb3UXK-lkp(a)intel.com/config)\n" "compiler: s390-linux-gcc (GCC) 11.3.0\n" "\n" @@ -26,27 +19,6 @@ "\n" "vim +/dir1 +540 fs/notify/fsnotify.c\n" "\n" - "d9a6f30bb89309 Amir Goldstein 2018-04-20 454 \n" - "90586523eb4b34 Eric Paris 2009-05-21 455 /*\n" - "40a100d3adc1ad Amir Goldstein 2020-07-22 456 * fsnotify - This is the main call to fsnotify.\n" - "40a100d3adc1ad Amir Goldstein 2020-07-22 457 *\n" - "40a100d3adc1ad Amir Goldstein 2020-07-22 458 * The VFS calls into hook specific functions in linux/fsnotify.h.\n" - "40a100d3adc1ad Amir Goldstein 2020-07-22 459 * Those functions then in turn call here. Here will call out to all of the\n" - "40a100d3adc1ad Amir Goldstein 2020-07-22 460 * registered fsnotify_group. Those groups can then use the notification event\n" - "40a100d3adc1ad Amir Goldstein 2020-07-22 461 * in whatever means they feel necessary.\n" - "40a100d3adc1ad Amir Goldstein 2020-07-22 462 *\n" - "40a100d3adc1ad Amir Goldstein 2020-07-22 463 * @mask:\tevent type and flags\n" - "40a100d3adc1ad Amir Goldstein 2020-07-22 464 * @data:\tobject that event happened on\n" - "40a100d3adc1ad Amir Goldstein 2020-07-22 465 * @data_type:\ttype of object for fanotify_data_XXX() accessors\n" - "40a100d3adc1ad Amir Goldstein 2020-07-22 466 * @dir:\toptional directory associated with event -\n" - "40a100d3adc1ad Amir Goldstein 2020-07-22 467 *\t\tif @file_name is not NULL, this is the directory that\n" - "40a100d3adc1ad Amir Goldstein 2020-07-22 468 *\t\t@file_name is relative to\n" - "40a100d3adc1ad Amir Goldstein 2020-07-22 469 * @file_name:\toptional file name associated with event\n" - "40a100d3adc1ad Amir Goldstein 2020-07-22 470 * @inode:\toptional inode associated with event -\n" - "29335033c574a1 Gabriel Krisman Bertazi 2021-10-25 471 *\t\tIf @dir and @inode are both non-NULL, event may be\n" - "29335033c574a1 Gabriel Krisman Bertazi 2021-10-25 472 *\t\treported to both.\n" - "40a100d3adc1ad Amir Goldstein 2020-07-22 473 * @cookie:\tinotify rename cookie\n" - "90586523eb4b34 Eric Paris 2009-05-21 474 */\n" "40a100d3adc1ad Amir Goldstein 2020-07-22 475 int fsnotify(__u32 mask, const void *data, int data_type, struct inode *dir,\n" "40a100d3adc1ad Amir Goldstein 2020-07-22 476 \t const struct qstr *file_name, struct inode *inode, u32 cookie)\n" "90586523eb4b34 Eric Paris 2009-05-21 477 {\n" @@ -72,6 +44,9 @@ "d25f3ce8da49ce Amir Goldstein 2022-05-07 497 \t\tdir1 = moved->d_parent->d_inode;\n" "d25f3ce8da49ce Amir Goldstein 2022-05-07 498 \t\tdir2 = dir;\n" "d25f3ce8da49ce Amir Goldstein 2022-05-07 @499 \t\tif (dir1->i_fsnotify_marks || dir2->i_fsnotify_marks)\n" + " ^^^^^^^^^^^^^^^^^^^^^^\n" + "Dereference\n" + "\n" "d25f3ce8da49ce Amir Goldstein 2022-05-07 500 \t\t\tdir1_type = FSNOTIFY_ITER_TYPE_OLD_DIR;\n" "d25f3ce8da49ce Amir Goldstein 2022-05-07 501 \t\t/*\n" "d25f3ce8da49ce Amir Goldstein 2022-05-07 502 \t\t * Send FS_RENAME to groups watching the moved inode itself\n" @@ -90,6 +65,9 @@ "d25f3ce8da49ce Amir Goldstein 2022-05-07 515 \t\tdir1 = dir;\n" "d25f3ce8da49ce Amir Goldstein 2022-05-07 516 \t\tdir2 = NULL;\n" "d25f3ce8da49ce Amir Goldstein 2022-05-07 517 \t\tif (dir1->i_fsnotify_marks)\n" + " ^^^^^^^^^^^^^^^^^^^^^^\n" + "Dereference\n" + "\n" "d25f3ce8da49ce Amir Goldstein 2022-05-07 518 \t\t\tdir1_type = FSNOTIFY_ITER_TYPE_PARENT;\n" "40a100d3adc1ad Amir Goldstein 2020-07-22 519 \t}\n" "497b0c5a7c0688 Amir Goldstein 2020-07-16 520 \n" @@ -113,6 +91,11 @@ "9b93f33105f5f9 Amir Goldstein 2020-07-16 538 \t\tmarks_mask |= inode->i_fsnotify_mask;\n" "d25f3ce8da49ce Amir Goldstein 2022-05-07 539 \tif (dir1_type) {\n" "d25f3ce8da49ce Amir Goldstein 2022-05-07 @540 \t\tif (dir1)\n" + "\n" + "If \"dir1_type\" is set then we have already dereferenced \"dir1\". I guess\n" + "this unnecessary NULL check is something that probably wouldn't bother\n" + "a human reader too much...\n" + "\n" "d25f3ce8da49ce Amir Goldstein 2022-05-07 541 \t\t\tmarks_mask |= dir1->i_fsnotify_mask;\n" "d25f3ce8da49ce Amir Goldstein 2022-05-07 542 \t\tif (dir2)\n" "d25f3ce8da49ce Amir Goldstein 2022-05-07 543 \t\t\tmarks_mask |= dir2->i_fsnotify_mask;\n" @@ -170,11 +153,9 @@ "c4ec54b40d33f8 Eric Paris 2009-12-17 595 \n" "98b5c10d320adf Jean-Christophe Dubois 2010-03-23 596 \treturn ret;\n" "90586523eb4b34 Eric Paris 2009-05-21 597 }\n" - "90586523eb4b34 Eric Paris 2009-05-21 598 EXPORT_SYMBOL_GPL(fsnotify);\n" - "90586523eb4b34 Eric Paris 2009-05-21 599 \n" "\n" "-- \n" "0-DAY CI Kernel Test Service\n" https://01.org/lkp -1e5ac18251cb327022b92781b8a958e5311a502fb91edc088be4cdd97766a835 +3abe546f8f3ebf16a804c7d342bf7bff528e7cc27de1cbe90b68f9082bbed51f
diff --git a/a/1.txt b/N2/1.txt index 828e25e..c016a75 100644 --- a/a/1.txt +++ b/N2/1.txt @@ -1,14 +1,7 @@ -CC: kbuild-all(a)lists.01.org -BCC: lkp(a)intel.com -CC: linux-kernel(a)vger.kernel.org -TO: Amir Goldstein <amir73il@gmail.com> - tree: https://github.com/amir73il/linux fsnotify-fixes head: d25f3ce8da49ce1a3b0a0621f0bf7b1d6ba2dad6 commit: d25f3ce8da49ce1a3b0a0621f0bf7b1d6ba2dad6 [2/2] fsnotify: send FS_RENAME to groups watching the moved inode -:::::: branch date: 4 hours ago -:::::: commit date: 4 hours ago -config: s390-randconfig-m031-20220508 (https://download.01.org/0day-ci/archive/20220508/202205080346.m0fb3UXK-lkp(a)intel.com/config) +config: s390-randconfig-m031-20220508 (https://download.01.org/0day-ci/archive/20220508/202205080346.m0fb3UXK-lkp@intel.com/config) compiler: s390-linux-gcc (GCC) 11.3.0 If you fix the issue, kindly add following tag as appropriate @@ -20,27 +13,6 @@ fs/notify/fsnotify.c:540 fsnotify() warn: variable dereferenced before check 'di vim +/dir1 +540 fs/notify/fsnotify.c -d9a6f30bb89309 Amir Goldstein 2018-04-20 454 -90586523eb4b34 Eric Paris 2009-05-21 455 /* -40a100d3adc1ad Amir Goldstein 2020-07-22 456 * fsnotify - This is the main call to fsnotify. -40a100d3adc1ad Amir Goldstein 2020-07-22 457 * -40a100d3adc1ad Amir Goldstein 2020-07-22 458 * The VFS calls into hook specific functions in linux/fsnotify.h. -40a100d3adc1ad Amir Goldstein 2020-07-22 459 * Those functions then in turn call here. Here will call out to all of the -40a100d3adc1ad Amir Goldstein 2020-07-22 460 * registered fsnotify_group. Those groups can then use the notification event -40a100d3adc1ad Amir Goldstein 2020-07-22 461 * in whatever means they feel necessary. -40a100d3adc1ad Amir Goldstein 2020-07-22 462 * -40a100d3adc1ad Amir Goldstein 2020-07-22 463 * @mask: event type and flags -40a100d3adc1ad Amir Goldstein 2020-07-22 464 * @data: object that event happened on -40a100d3adc1ad Amir Goldstein 2020-07-22 465 * @data_type: type of object for fanotify_data_XXX() accessors -40a100d3adc1ad Amir Goldstein 2020-07-22 466 * @dir: optional directory associated with event - -40a100d3adc1ad Amir Goldstein 2020-07-22 467 * if @file_name is not NULL, this is the directory that -40a100d3adc1ad Amir Goldstein 2020-07-22 468 * @file_name is relative to -40a100d3adc1ad Amir Goldstein 2020-07-22 469 * @file_name: optional file name associated with event -40a100d3adc1ad Amir Goldstein 2020-07-22 470 * @inode: optional inode associated with event - -29335033c574a1 Gabriel Krisman Bertazi 2021-10-25 471 * If @dir and @inode are both non-NULL, event may be -29335033c574a1 Gabriel Krisman Bertazi 2021-10-25 472 * reported to both. -40a100d3adc1ad Amir Goldstein 2020-07-22 473 * @cookie: inotify rename cookie -90586523eb4b34 Eric Paris 2009-05-21 474 */ 40a100d3adc1ad Amir Goldstein 2020-07-22 475 int fsnotify(__u32 mask, const void *data, int data_type, struct inode *dir, 40a100d3adc1ad Amir Goldstein 2020-07-22 476 const struct qstr *file_name, struct inode *inode, u32 cookie) 90586523eb4b34 Eric Paris 2009-05-21 477 { @@ -66,6 +38,9 @@ e54183fa7047c1 Amir Goldstein 2021-11-29 496 moved = fsnotify_data_ d25f3ce8da49ce Amir Goldstein 2022-05-07 497 dir1 = moved->d_parent->d_inode; d25f3ce8da49ce Amir Goldstein 2022-05-07 498 dir2 = dir; d25f3ce8da49ce Amir Goldstein 2022-05-07 @499 if (dir1->i_fsnotify_marks || dir2->i_fsnotify_marks) + ^^^^^^^^^^^^^^^^^^^^^^ +Dereference + d25f3ce8da49ce Amir Goldstein 2022-05-07 500 dir1_type = FSNOTIFY_ITER_TYPE_OLD_DIR; d25f3ce8da49ce Amir Goldstein 2022-05-07 501 /* d25f3ce8da49ce Amir Goldstein 2022-05-07 502 * Send FS_RENAME to groups watching the moved inode itself @@ -84,6 +59,9 @@ fecc4559780d52 Amir Goldstein 2020-12-02 513 * watching children a d25f3ce8da49ce Amir Goldstein 2022-05-07 515 dir1 = dir; d25f3ce8da49ce Amir Goldstein 2022-05-07 516 dir2 = NULL; d25f3ce8da49ce Amir Goldstein 2022-05-07 517 if (dir1->i_fsnotify_marks) + ^^^^^^^^^^^^^^^^^^^^^^ +Dereference + d25f3ce8da49ce Amir Goldstein 2022-05-07 518 dir1_type = FSNOTIFY_ITER_TYPE_PARENT; 40a100d3adc1ad Amir Goldstein 2020-07-22 519 } 497b0c5a7c0688 Amir Goldstein 2020-07-16 520 @@ -107,6 +85,11 @@ d25f3ce8da49ce Amir Goldstein 2022-05-07 531 !dir1_type) 9b93f33105f5f9 Amir Goldstein 2020-07-16 538 marks_mask |= inode->i_fsnotify_mask; d25f3ce8da49ce Amir Goldstein 2022-05-07 539 if (dir1_type) { d25f3ce8da49ce Amir Goldstein 2022-05-07 @540 if (dir1) + +If "dir1_type" is set then we have already dereferenced "dir1". I guess +this unnecessary NULL check is something that probably wouldn't bother +a human reader too much... + d25f3ce8da49ce Amir Goldstein 2022-05-07 541 marks_mask |= dir1->i_fsnotify_mask; d25f3ce8da49ce Amir Goldstein 2022-05-07 542 if (dir2) d25f3ce8da49ce Amir Goldstein 2022-05-07 543 marks_mask |= dir2->i_fsnotify_mask; @@ -164,8 +147,6 @@ ff8bcbd03da881 Eric Paris 2010-10-28 593 out: c4ec54b40d33f8 Eric Paris 2009-12-17 595 98b5c10d320adf Jean-Christophe Dubois 2010-03-23 596 return ret; 90586523eb4b34 Eric Paris 2009-05-21 597 } -90586523eb4b34 Eric Paris 2009-05-21 598 EXPORT_SYMBOL_GPL(fsnotify); -90586523eb4b34 Eric Paris 2009-05-21 599 -- 0-DAY CI Kernel Test Service diff --git a/a/content_digest b/N2/content_digest index 06410c5..c341359 100644 --- a/a/content_digest +++ b/N2/content_digest @@ -1,20 +1,17 @@ - "From\0kernel test robot <lkp@intel.com>\0" + "From\0Dan Carpenter <dan.carpenter@oracle.com>\0" "Subject\0[amir73il:fsnotify-fixes 2/2] fs/notify/fsnotify.c:540 fsnotify() warn: variable dereferenced before check 'dir1' (see line 499)\0" - "Date\0Sun, 08 May 2022 03:26:49 +0800\0" - "To\0kbuild@lists.01.org\0" - "\01:1\0" + "Date\0Mon, 9 May 2022 13:08:37 +0300\0" + "To\0kbuild@lists.01.org" + " Amir Goldstein <amir73il@gmail.com>\0" + "Cc\0lkp@intel.com" + kbuild-all@lists.01.org + " linux-kernel@vger.kernel.org\0" + "\00:1\0" "b\0" - "CC: kbuild-all(a)lists.01.org\n" - "BCC: lkp(a)intel.com\n" - "CC: linux-kernel(a)vger.kernel.org\n" - "TO: Amir Goldstein <amir73il@gmail.com>\n" - "\n" "tree: https://github.com/amir73il/linux fsnotify-fixes\n" "head: d25f3ce8da49ce1a3b0a0621f0bf7b1d6ba2dad6\n" "commit: d25f3ce8da49ce1a3b0a0621f0bf7b1d6ba2dad6 [2/2] fsnotify: send FS_RENAME to groups watching the moved inode\n" - ":::::: branch date: 4 hours ago\n" - ":::::: commit date: 4 hours ago\n" - "config: s390-randconfig-m031-20220508 (https://download.01.org/0day-ci/archive/20220508/202205080346.m0fb3UXK-lkp(a)intel.com/config)\n" + "config: s390-randconfig-m031-20220508 (https://download.01.org/0day-ci/archive/20220508/202205080346.m0fb3UXK-lkp@intel.com/config)\n" "compiler: s390-linux-gcc (GCC) 11.3.0\n" "\n" "If you fix the issue, kindly add following tag as appropriate\n" @@ -26,27 +23,6 @@ "\n" "vim +/dir1 +540 fs/notify/fsnotify.c\n" "\n" - "d9a6f30bb89309 Amir Goldstein 2018-04-20 454 \n" - "90586523eb4b34 Eric Paris 2009-05-21 455 /*\n" - "40a100d3adc1ad Amir Goldstein 2020-07-22 456 * fsnotify - This is the main call to fsnotify.\n" - "40a100d3adc1ad Amir Goldstein 2020-07-22 457 *\n" - "40a100d3adc1ad Amir Goldstein 2020-07-22 458 * The VFS calls into hook specific functions in linux/fsnotify.h.\n" - "40a100d3adc1ad Amir Goldstein 2020-07-22 459 * Those functions then in turn call here. Here will call out to all of the\n" - "40a100d3adc1ad Amir Goldstein 2020-07-22 460 * registered fsnotify_group. Those groups can then use the notification event\n" - "40a100d3adc1ad Amir Goldstein 2020-07-22 461 * in whatever means they feel necessary.\n" - "40a100d3adc1ad Amir Goldstein 2020-07-22 462 *\n" - "40a100d3adc1ad Amir Goldstein 2020-07-22 463 * @mask:\tevent type and flags\n" - "40a100d3adc1ad Amir Goldstein 2020-07-22 464 * @data:\tobject that event happened on\n" - "40a100d3adc1ad Amir Goldstein 2020-07-22 465 * @data_type:\ttype of object for fanotify_data_XXX() accessors\n" - "40a100d3adc1ad Amir Goldstein 2020-07-22 466 * @dir:\toptional directory associated with event -\n" - "40a100d3adc1ad Amir Goldstein 2020-07-22 467 *\t\tif @file_name is not NULL, this is the directory that\n" - "40a100d3adc1ad Amir Goldstein 2020-07-22 468 *\t\t@file_name is relative to\n" - "40a100d3adc1ad Amir Goldstein 2020-07-22 469 * @file_name:\toptional file name associated with event\n" - "40a100d3adc1ad Amir Goldstein 2020-07-22 470 * @inode:\toptional inode associated with event -\n" - "29335033c574a1 Gabriel Krisman Bertazi 2021-10-25 471 *\t\tIf @dir and @inode are both non-NULL, event may be\n" - "29335033c574a1 Gabriel Krisman Bertazi 2021-10-25 472 *\t\treported to both.\n" - "40a100d3adc1ad Amir Goldstein 2020-07-22 473 * @cookie:\tinotify rename cookie\n" - "90586523eb4b34 Eric Paris 2009-05-21 474 */\n" "40a100d3adc1ad Amir Goldstein 2020-07-22 475 int fsnotify(__u32 mask, const void *data, int data_type, struct inode *dir,\n" "40a100d3adc1ad Amir Goldstein 2020-07-22 476 \t const struct qstr *file_name, struct inode *inode, u32 cookie)\n" "90586523eb4b34 Eric Paris 2009-05-21 477 {\n" @@ -72,6 +48,9 @@ "d25f3ce8da49ce Amir Goldstein 2022-05-07 497 \t\tdir1 = moved->d_parent->d_inode;\n" "d25f3ce8da49ce Amir Goldstein 2022-05-07 498 \t\tdir2 = dir;\n" "d25f3ce8da49ce Amir Goldstein 2022-05-07 @499 \t\tif (dir1->i_fsnotify_marks || dir2->i_fsnotify_marks)\n" + " ^^^^^^^^^^^^^^^^^^^^^^\n" + "Dereference\n" + "\n" "d25f3ce8da49ce Amir Goldstein 2022-05-07 500 \t\t\tdir1_type = FSNOTIFY_ITER_TYPE_OLD_DIR;\n" "d25f3ce8da49ce Amir Goldstein 2022-05-07 501 \t\t/*\n" "d25f3ce8da49ce Amir Goldstein 2022-05-07 502 \t\t * Send FS_RENAME to groups watching the moved inode itself\n" @@ -90,6 +69,9 @@ "d25f3ce8da49ce Amir Goldstein 2022-05-07 515 \t\tdir1 = dir;\n" "d25f3ce8da49ce Amir Goldstein 2022-05-07 516 \t\tdir2 = NULL;\n" "d25f3ce8da49ce Amir Goldstein 2022-05-07 517 \t\tif (dir1->i_fsnotify_marks)\n" + " ^^^^^^^^^^^^^^^^^^^^^^\n" + "Dereference\n" + "\n" "d25f3ce8da49ce Amir Goldstein 2022-05-07 518 \t\t\tdir1_type = FSNOTIFY_ITER_TYPE_PARENT;\n" "40a100d3adc1ad Amir Goldstein 2020-07-22 519 \t}\n" "497b0c5a7c0688 Amir Goldstein 2020-07-16 520 \n" @@ -113,6 +95,11 @@ "9b93f33105f5f9 Amir Goldstein 2020-07-16 538 \t\tmarks_mask |= inode->i_fsnotify_mask;\n" "d25f3ce8da49ce Amir Goldstein 2022-05-07 539 \tif (dir1_type) {\n" "d25f3ce8da49ce Amir Goldstein 2022-05-07 @540 \t\tif (dir1)\n" + "\n" + "If \"dir1_type\" is set then we have already dereferenced \"dir1\". I guess\n" + "this unnecessary NULL check is something that probably wouldn't bother\n" + "a human reader too much...\n" + "\n" "d25f3ce8da49ce Amir Goldstein 2022-05-07 541 \t\t\tmarks_mask |= dir1->i_fsnotify_mask;\n" "d25f3ce8da49ce Amir Goldstein 2022-05-07 542 \t\tif (dir2)\n" "d25f3ce8da49ce Amir Goldstein 2022-05-07 543 \t\t\tmarks_mask |= dir2->i_fsnotify_mask;\n" @@ -170,11 +157,9 @@ "c4ec54b40d33f8 Eric Paris 2009-12-17 595 \n" "98b5c10d320adf Jean-Christophe Dubois 2010-03-23 596 \treturn ret;\n" "90586523eb4b34 Eric Paris 2009-05-21 597 }\n" - "90586523eb4b34 Eric Paris 2009-05-21 598 EXPORT_SYMBOL_GPL(fsnotify);\n" - "90586523eb4b34 Eric Paris 2009-05-21 599 \n" "\n" "-- \n" "0-DAY CI Kernel Test Service\n" https://01.org/lkp -1e5ac18251cb327022b92781b8a958e5311a502fb91edc088be4cdd97766a835 +da543a9908a01fe6a8022e8844b2790245fb043ecda32b904b29a8f93e8d63b9
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.