From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: Re: [PATCH v4 1/2] NFSD: delay unmount source's export after inter-server copy completed.
Date: Sat, 24 Apr 2021 09:50:14 +0800 [thread overview]
Message-ID: <202104240954.oWlfpfvL-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 5265 bytes --]
CC: kbuild-all(a)lists.01.org
In-Reply-To: <20210423205946.24407-2-dai.ngo@oracle.com>
References: <20210423205946.24407-2-dai.ngo@oracle.com>
TO: Dai Ngo <dai.ngo@oracle.com>
TO: olga.kornievskaia(a)gmail.com
CC: trondmy(a)hammerspace.com
CC: bfields(a)fieldses.org
CC: chuck.lever(a)oracle.com
CC: linux-nfs(a)vger.kernel.org
Hi Dai,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on nfs/linux-next]
[also build test WARNING on v5.12-rc8 next-20210423]
[cannot apply to nfsd/nfsd-next]
[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]
url: https://github.com/0day-ci/linux/commits/Dai-Ngo/NFSD-delay-unmount-source-s-export-after-inter-server-copy-completed/20210424-050057
base: git://git.linux-nfs.org/projects/trondmy/linux-nfs.git linux-next
:::::: branch date: 5 hours ago
:::::: commit date: 5 hours ago
config: powerpc-randconfig-c004-20210423 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>
cocci warnings: (new ones prefixed by >>)
>> fs/nfsd/nfs4proc.c:1473:32-34: ERROR: invalid reference to the index variable of the iterator on line 1450
vim +1473 fs/nfsd/nfs4proc.c
ce0887ac96d35c Olga Kornievskaia 2019-10-09 1433
ce0887ac96d35c Olga Kornievskaia 2019-10-09 1434 static void
ce0887ac96d35c Olga Kornievskaia 2019-10-09 1435 nfsd4_cleanup_inter_ssc(struct vfsmount *ss_mnt, struct nfsd_file *src,
ce0887ac96d35c Olga Kornievskaia 2019-10-09 1436 struct nfsd_file *dst)
ce0887ac96d35c Olga Kornievskaia 2019-10-09 1437 {
1a813b689731b1 Dai Ngo 2021-04-23 1438 bool found = false;
1a813b689731b1 Dai Ngo 2021-04-23 1439 bool resched = false;
1a813b689731b1 Dai Ngo 2021-04-23 1440 long timeout;
1a813b689731b1 Dai Ngo 2021-04-23 1441 struct nfsd4_ssc_umount_item *tmp;
1a813b689731b1 Dai Ngo 2021-04-23 1442 struct nfsd4_ssc_umount_item *ni = 0;
1a813b689731b1 Dai Ngo 2021-04-23 1443
ce0887ac96d35c Olga Kornievskaia 2019-10-09 1444 nfs42_ssc_close(src->nf_file);
ce0887ac96d35c Olga Kornievskaia 2019-10-09 1445 nfsd_file_put(dst);
1a813b689731b1 Dai Ngo 2021-04-23 1446 fput(src->nf_file);
1a813b689731b1 Dai Ngo 2021-04-23 1447
1a813b689731b1 Dai Ngo 2021-04-23 1448 timeout = msecs_to_jiffies(nfsd4_ssc_umount_timeout);
1a813b689731b1 Dai Ngo 2021-04-23 1449 spin_lock(&nfsd4_ssc_umount.nsu_lock);
1a813b689731b1 Dai Ngo 2021-04-23 @1450 list_for_each_entry_safe(ni, tmp, &nfsd4_ssc_umount.nsu_list,
1a813b689731b1 Dai Ngo 2021-04-23 1451 nsui_list) {
1a813b689731b1 Dai Ngo 2021-04-23 1452 if (ni->nsui_vfsmount->mnt_sb == ss_mnt->mnt_sb) {
1a813b689731b1 Dai Ngo 2021-04-23 1453 list_del(&ni->nsui_list);
1a813b689731b1 Dai Ngo 2021-04-23 1454 /*
1a813b689731b1 Dai Ngo 2021-04-23 1455 * vfsmount can be shared by multiple exports,
1a813b689731b1 Dai Ngo 2021-04-23 1456 * decrement refcnt and schedule delayed task
1a813b689731b1 Dai Ngo 2021-04-23 1457 * if it drops to 0.
1a813b689731b1 Dai Ngo 2021-04-23 1458 */
1a813b689731b1 Dai Ngo 2021-04-23 1459 if (refcount_dec_and_test(&ni->nsui_refcnt))
1a813b689731b1 Dai Ngo 2021-04-23 1460 resched = true;
1a813b689731b1 Dai Ngo 2021-04-23 1461 ni->nsui_expire = jiffies + timeout;
1a813b689731b1 Dai Ngo 2021-04-23 1462 list_add_tail(&ni->nsui_list, &nfsd4_ssc_umount.nsu_list);
1a813b689731b1 Dai Ngo 2021-04-23 1463 found = true;
1a813b689731b1 Dai Ngo 2021-04-23 1464 break;
1a813b689731b1 Dai Ngo 2021-04-23 1465 }
1a813b689731b1 Dai Ngo 2021-04-23 1466 }
1a813b689731b1 Dai Ngo 2021-04-23 1467 if (!found) {
1a813b689731b1 Dai Ngo 2021-04-23 1468 spin_unlock(&nfsd4_ssc_umount.nsu_lock);
ce0887ac96d35c Olga Kornievskaia 2019-10-09 1469 mntput(ss_mnt);
1a813b689731b1 Dai Ngo 2021-04-23 1470 return;
1a813b689731b1 Dai Ngo 2021-04-23 1471 }
1a813b689731b1 Dai Ngo 2021-04-23 1472 if (resched && !nfsd4_ssc_umount.nsu_expire) {
1a813b689731b1 Dai Ngo 2021-04-23 @1473 nfsd4_ssc_umount.nsu_expire = ni->nsui_expire;
1a813b689731b1 Dai Ngo 2021-04-23 1474 schedule_delayed_work(&nfsd4_ssc_umount.nsu_umount_work,
1a813b689731b1 Dai Ngo 2021-04-23 1475 timeout);
1a813b689731b1 Dai Ngo 2021-04-23 1476 }
1a813b689731b1 Dai Ngo 2021-04-23 1477 spin_unlock(&nfsd4_ssc_umount.nsu_lock);
ce0887ac96d35c Olga Kornievskaia 2019-10-09 1478 }
ce0887ac96d35c Olga Kornievskaia 2019-10-09 1479
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 29478 bytes --]
next reply other threads:[~2021-04-24 1:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-24 1:50 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-04-23 20:59 [PATCH v4 0/2] NFSD: delay unmount source's export after inter-server copy completed Dai Ngo
2021-04-23 20:59 ` [PATCH v4 1/2] " Dai Ngo
2021-05-14 18:12 ` Olga Kornievskaia
2021-05-14 18:42 ` J. Bruce Fields
2021-05-14 20:19 ` dai.ngo
2021-05-14 20:08 ` dai.ngo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202104240954.oWlfpfvL-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.