All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com
Subject: fs/nfs/unlink.c:476:17: warning: assignment to 'struct dentry *' from 'int' makes pointer from integer without a cast
Date: Sun, 25 Oct 2026 04:47:10 +0800	[thread overview]
Message-ID: <202610250449.g8NC02c3-lkp@intel.com> (raw)

:::::: 
:::::: Manual check reason: "bisect to a FBC not belonging to original linux-review patches: branch: linux-review/UPDATE-20261023-132215/NeilBrown/nfs-fix-open-blocking-with-d_fsdata/20261023-125011, commit: d05202b07b194252069991dde5cae5fe37df7e75"
:::::: 

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: NeilBrown <neil@brown.name>
CC: 0day robot <lkp@intel.com>

tree:   https://github.com/intel-lab-lkp/linux/commits/UPDATE-20261023-132215/NeilBrown/nfs-fix-open-blocking-with-d_fsdata/20261023-125011
head:   e3a7aa9117daa6410fe3ee62c36e5397e61a664d
commit: d05202b07b194252069991dde5cae5fe37df7e75 nfs: use d_alloc_trylock() in silly-rename
date:   25 hours ago
:::::: branch date: 25 hours ago
:::::: commit date: 25 hours ago
config: nios2-defconfig (https://download.01.org/0day-ci/archive/20261025/202610250449.g8NC02c3-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 11.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261025/202610250449.g8NC02c3-lkp@intel.com/reproduce)

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 <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202610250449.g8NC02c3-lkp@intel.com/

All warnings (new ones prefixed by >>):

   fs/nfs/unlink.c: In function 'nfs_sillyrename':
   fs/nfs/unlink.c:476:19: error: implicit declaration of function 'd_alloc_trylock'; did you mean 'folio_trylock'? [-Werror=implicit-function-declaration]
     476 |         sdentry = d_alloc_trylock(dentry->d_parent, &QSTR(silly));
         |                   ^~~~~~~~~~~~~~~
         |                   folio_trylock
>> fs/nfs/unlink.c:476:17: warning: assignment to 'struct dentry *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     476 |         sdentry = d_alloc_trylock(dentry->d_parent, &QSTR(silly));
         |                 ^
   cc1: some warnings being treated as errors


vim +476 fs/nfs/unlink.c

96f9d8c0740264 Jeff Layton     2014-03-17  415  
c2dd1378fa3b52 Trond Myklebust 2013-08-21  416  #define SILLYNAME_PREFIX ".nfs"
c2dd1378fa3b52 Trond Myklebust 2013-08-21  417  #define SILLYNAME_PREFIX_LEN ((unsigned)sizeof(SILLYNAME_PREFIX) - 1)
c2dd1378fa3b52 Trond Myklebust 2013-08-21  418  #define SILLYNAME_FILEID_LEN ((unsigned)sizeof(u64) << 1)
c2dd1378fa3b52 Trond Myklebust 2013-08-21  419  #define SILLYNAME_COUNTER_LEN ((unsigned)sizeof(unsigned int) << 1)
c2dd1378fa3b52 Trond Myklebust 2013-08-21  420  #define SILLYNAME_LEN (SILLYNAME_PREFIX_LEN + \
c2dd1378fa3b52 Trond Myklebust 2013-08-21  421  		SILLYNAME_FILEID_LEN + \
c2dd1378fa3b52 Trond Myklebust 2013-08-21  422  		SILLYNAME_COUNTER_LEN)
c2dd1378fa3b52 Trond Myklebust 2013-08-21  423  
779c51795bfb35 Jeff Layton     2010-09-17  424  /**
779c51795bfb35 Jeff Layton     2010-09-17  425   * nfs_sillyrename - Perform a silly-rename of a dentry
779c51795bfb35 Jeff Layton     2010-09-17  426   * @dir: inode of directory that contains dentry
779c51795bfb35 Jeff Layton     2010-09-17  427   * @dentry: dentry to be sillyrenamed
779c51795bfb35 Jeff Layton     2010-09-17  428   *
779c51795bfb35 Jeff Layton     2010-09-17  429   * NFSv2/3 is stateless and the server doesn't know when the client is
779c51795bfb35 Jeff Layton     2010-09-17  430   * holding a file open. To prevent application problems when a file is
779c51795bfb35 Jeff Layton     2010-09-17  431   * unlinked while it's still open, the client performs a "silly-rename".
779c51795bfb35 Jeff Layton     2010-09-17  432   * That is, it renames the file to a hidden file in the same directory,
779c51795bfb35 Jeff Layton     2010-09-17  433   * and only performs the unlink once the last reference to it is put.
779c51795bfb35 Jeff Layton     2010-09-17  434   *
779c51795bfb35 Jeff Layton     2010-09-17  435   * The final cleanup is done during dentry_iput.
674e405b8b3310 J. Bruce Fields 2011-07-15  436   *
674e405b8b3310 J. Bruce Fields 2011-07-15  437   * (Note: NFSv4 is stateful, and has opens, so in theory an NFSv4 server
674e405b8b3310 J. Bruce Fields 2011-07-15  438   * could take responsibility for keeping open files referenced.  The server
674e405b8b3310 J. Bruce Fields 2011-07-15  439   * would also need to ensure that opened-but-deleted files were kept over
674e405b8b3310 J. Bruce Fields 2011-07-15  440   * reboots.  However, we may not assume a server does so.  (RFC 5661
674e405b8b3310 J. Bruce Fields 2011-07-15  441   * does provide an OPEN4_RESULT_PRESERVE_UNLINKED flag that a server can
674e405b8b3310 J. Bruce Fields 2011-07-15  442   * use to advertise that it does this; some day we may take advantage of
674e405b8b3310 J. Bruce Fields 2011-07-15  443   * it.))
779c51795bfb35 Jeff Layton     2010-09-17  444   */
779c51795bfb35 Jeff Layton     2010-09-17  445  int
779c51795bfb35 Jeff Layton     2010-09-17  446  nfs_sillyrename(struct inode *dir, struct dentry *dentry)
779c51795bfb35 Jeff Layton     2010-09-17  447  {
779c51795bfb35 Jeff Layton     2010-09-17  448  	static unsigned int sillycounter;
c2dd1378fa3b52 Trond Myklebust 2013-08-21  449  	unsigned char silly[SILLYNAME_LEN + 1];
c2dd1378fa3b52 Trond Myklebust 2013-08-21  450  	unsigned long long fileid;
d05202b07b1942 NeilBrown       2026-10-23  451  	struct dentry *sdentry, *old;
3cb3fd6da4e9c8 Trond Myklebust 2018-04-09  452  	struct inode *inode = d_inode(dentry);
d3d4152a5d59af Jeff Layton     2010-09-17  453  	struct rpc_task *task;
4f5829d7263651 Geyslan G. Bem  2013-10-11  454  	int            error = -EBUSY;
779c51795bfb35 Jeff Layton     2010-09-17  455  
6de1472f1a4a3b Al Viro         2013-09-16  456  	dfprintk(VFS, "NFS: silly-rename(%pd2, ct=%d)\n",
6de1472f1a4a3b Al Viro         2013-09-16  457  		dentry, d_count(dentry));
779c51795bfb35 Jeff Layton     2010-09-17  458  	nfs_inc_stats(dir, NFSIOS_SILLYRENAME);
779c51795bfb35 Jeff Layton     2010-09-17  459  
779c51795bfb35 Jeff Layton     2010-09-17  460  	/*
779c51795bfb35 Jeff Layton     2010-09-17  461  	 * We don't allow a dentry to be silly-renamed twice.
779c51795bfb35 Jeff Layton     2010-09-17  462  	 */
779c51795bfb35 Jeff Layton     2010-09-17  463  	if (dentry->d_flags & DCACHE_NFSFS_RENAMED)
779c51795bfb35 Jeff Layton     2010-09-17  464  		goto out;
779c51795bfb35 Jeff Layton     2010-09-17  465  
2026c8a96afe6e Jeff Layton     2026-05-12  466  	fileid = d_inode(dentry)->i_ino;
779c51795bfb35 Jeff Layton     2010-09-17  467  
d05202b07b1942 NeilBrown       2026-10-23  468  newname:
779c51795bfb35 Jeff Layton     2010-09-17  469  	sillycounter++;
fa6fe07d153636 NeilBrown       2025-03-19  470  	scnprintf(silly, sizeof(silly),
c2dd1378fa3b52 Trond Myklebust 2013-08-21  471  		  SILLYNAME_PREFIX "%0*llx%0*x",
c2dd1378fa3b52 Trond Myklebust 2013-08-21  472  		  SILLYNAME_FILEID_LEN, fileid,
c2dd1378fa3b52 Trond Myklebust 2013-08-21  473  		  SILLYNAME_COUNTER_LEN, sillycounter);
779c51795bfb35 Jeff Layton     2010-09-17  474  
d05202b07b1942 NeilBrown       2026-10-23  475  	dfprintk(VFS, "NFS: trying to rename %pd to %s\n", dentry, silly);
d05202b07b1942 NeilBrown       2026-10-23 @476  	sdentry = d_alloc_trylock(dentry->d_parent, &QSTR(silly));

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

                 reply	other threads:[~2026-10-24 20:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202610250449.g8NC02c3-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=oe-kbuild@lists.linux.dev \
    /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.