mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Hongling Zeng <zenghongling@kylinos.cn>,
	linkinjeon@kernel.org, hyc.lee@gmail.com, liubaolin12138@163.com
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	ntfs@lists.linux.dev, linux-kernel@vger.kernel.org,
	Hongling Zeng <zenghongling@kylinos.cn>,
	stable@vger.kernel.org, Baolin Liu <liubaolin@kylinos.cn>
Subject: Re: [PATCH v6 2/6] ntfs: roll back the size update when the attribute lookup fails
Date: Thu, 3 Dec 2026 10:38:36 +0800	[thread overview]
Message-ID: <20261203102615.WgRQ2XEm-lkp@intel.com> (raw)
In-Reply-To: <20261202054112.1138977-3-zenghongling@kylinos.cn>

Hi Hongling,

kernel test robot noticed the following build errors:

[auto build test ERROR on next-20261130]
[also build test ERROR on v7.4-rc5]
[cannot apply to brauner-vfs/vfs.all linus/master v7.4-rc5 v7.4-rc4 v7.4-rc3]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Hongling-Zeng/ntfs-roll-back-the-size-update-when-the-attribute-lookup-fails/20261202-134108
base:   next-20261130
patch link:    https://lore.kernel.org/r/20261202054112.1138977-3-zenghongling%40kylinos.cn
patch subject: [PATCH v6 2/6] ntfs: roll back the size update when the attribute lookup fails
config: s390-defconfig (https://download.01.org/0day-ci/archive/20261203/20261203102615.WgRQ2XEm-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261203/20261203102615.WgRQ2XEm-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/oe-kbuild-all/20261203102615.WgRQ2XEm-lkp@intel.com/

All errors (new ones prefixed by >>):

>> fs/ntfs/inode.c:4173:19: error: call to undeclared function 'ntfs_attr_set_data_size'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    4173 |                         rollback_err = ntfs_attr_set_data_size(ni,
         |                                        ^
   1 error generated.


vim +/ntfs_attr_set_data_size +4173 fs/ntfs/inode.c

  4146	
  4147	/* Undo the deferred size update like ntfs_write_rollback() does. */
  4148	static void ntfs_inode_rollback_enlarge(struct inode *vi,
  4149			struct ntfs_inode *mrec_ni, s64 new_data_size,
  4150			s64 old_data_size, s64 old_alloc_size)
  4151	{
  4152		struct ntfs_inode *ni = NTFS_I(vi);
  4153		bool stream = ntfs_inode_is_named_stream(ni);
  4154		unsigned long flags;
  4155		s64 current_data_size;
  4156		int rollback_err = 0;
  4157	
  4158		if (stream)
  4159			truncate_setsize(vi, old_data_size);
  4160	
  4161		mutex_lock(&mrec_ni->mrec_lock);
  4162		read_lock_irqsave(&ni->size_lock, flags);
  4163		current_data_size = ni->data_size;
  4164		read_unlock_irqrestore(&ni->size_lock, flags);
  4165		if (current_data_size == new_data_size) {
  4166			/* Free only what the write allocated. */
  4167			s64 keep = max(old_data_size, old_alloc_size);
  4168	
  4169			if (ni->allocated_size > keep)
  4170				rollback_err = __ntfs_attr_truncate_vfs(ni, keep,
  4171						keep);
  4172			if (!rollback_err && ni->data_size != old_data_size)
> 4173				rollback_err = ntfs_attr_set_data_size(ni,
  4174						old_data_size);
  4175		}
  4176		mutex_unlock(&mrec_ni->mrec_lock);
  4177		if (rollback_err) {
  4178			/* The sizes may be inconsistent now. */
  4179			read_lock_irqsave(&ni->size_lock, flags);
  4180			current_data_size = ni->data_size;
  4181			read_unlock_irqrestore(&ni->size_lock, flags);
  4182			i_size_write(vi, current_data_size);
  4183			NVolSetErrors(ni->vol);
  4184			ntfs_error(vi->i_sb, "Failed to roll back the size update: %d",
  4185					rollback_err);
  4186		} else if (current_data_size != new_data_size) {
  4187			/* A concurrent write took over the extension. */
  4188			i_size_write(vi, current_data_size);
  4189		} else if (!stream) {
  4190			/* No folio was dropped. */
  4191			i_size_write(vi, old_data_size);
  4192		}
  4193	}
  4194	

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

  reply	other threads:[~2026-12-03  2:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-02  5:41 [PATCH v6 0/6] ntfs: synchronize the in-memory size handling Hongling Zeng
2026-12-02  5:41 ` [PATCH v6 1/6] ntfs: mark the record dirtied by a resident write in iomap_end Hongling Zeng
2026-12-02  5:41 ` [PATCH v6 2/6] ntfs: roll back the size update when the attribute lookup fails Hongling Zeng
2026-12-03  2:38   ` kernel test robot [this message]
2026-12-02  5:41 ` [PATCH v6 3/6] ntfs: read initialized_size under size_lock in the iomap paths Hongling Zeng
2026-12-02  5:41 ` [PATCH v6 4/6] ntfs: update the in-memory sizes under the size lock Hongling Zeng
2026-12-02  5:41 ` [PATCH v6 5/6] ntfs: serialize the mmap write fault initialized size update Hongling Zeng
2026-12-02  5:41 ` [PATCH v6 6/6] ntfs: read initialized_size under size_lock in the mmap prepare path Hongling Zeng

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=20261203102615.WgRQ2XEm-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=hyc.lee@gmail.com \
    --cc=linkinjeon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liubaolin12138@163.com \
    --cc=liubaolin@kylinos.cn \
    --cc=llvm@lists.linux.dev \
    --cc=ntfs@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=stable@vger.kernel.org \
    --cc=zenghongling@kylinos.cn \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®