mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jan Harkes <jaharkes@cs.cmu.edu>
To: Konstantin Adzer <info@massivetech.ru>
Cc: "Alexander Viro" <viro@zeniv.linux.org.uk>,
	"Christian Brauner" <brauner@kernel.org>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Shuah Khan" <skhan@linuxfoundation.org>,
	"Randy Dunlap" <rdunlap@infradead.org>,
	"Dan Williams" <djbw@kernel.org>,
	"Vishal Verma" <vishal.l.verma@intel.com>,
	"Dave Jiang" <dave.jiang@intel.com>,
	"Alison Schofield" <alison.schofield@intel.com>,
	"Eric Van Hensbergen" <ericvh@kernel.org>,
	"Latchesar Ionkov" <lucho@ionkov.net>,
	"Dominique Martinet" <asmadeus@codewreck.org>,
	"Christian Schoenebeck" <linux_oss@crudebyte.com>,
	"David Sterba" <dsterba@suse.com>,
	"David Howells" <dhowells@redhat.com>,
	"Marc Dionne" <marc.dionne@auristor.com>,
	"Luis de Bethencourt" <luisbg@kernel.org>,
	"Salah Triki" <salah.triki@gmail.com>,
	"Chris Mason" <mason@kernel.org>,
	"Ilya Dryomov" <idryomov@gmail.com>,
	"Alex Markuze" <amarkuze@redhat.com>,
	"Xiubo Li" <xiubo.li@clyso.com>,
	"Viacheslav Dubeyko" <slava@dubeyko.com>,
	"Nicolas Pitre" <nico@fluxnic.net>,
	"Tyler Hicks" <code@tyhicks.com>, "Gao Xiang" <xiang@kernel.org>,
	"Chao Yu" <chao@kernel.org>, "Yue Hu" <zbestahu@gmail.com>,
	"Jingbo Xu" <jefflexu@163.com>,
	"Sandeep Dhavale" <dhavale@google.com>,
	"Hongbo Li" <hongbohbli@tencent.com>,
	"Chunhai Guo" <guochunhai@vivo.com>, "Jan Kara" <jack@suse.cz>,
	"Theodore Ts'o" <tytso@mit.edu>,
	"Andreas Dilger" <adilger.kernel@dilger.ca>,
	"Baokun Li" <libaokun@linux.alibaba.com>,
	"Ojaswin Mujoo" <ojaswin@linux.ibm.com>,
	"Ritesh Harjani (IBM)" <ritesh.list@gmail.com>,
	"Zhang Yi" <yi.zhang@huawei.com>,
	"Jaegeuk Kim" <jaegeuk@kernel.org>,
	"Miklos Szeredi" <miklos@szeredi.hu>,
	"Andreas Gruenbacher" <agruenba@redhat.com>,
	"John Paul Adrian Glaubitz" <glaubitz@physik.fu-berlin.de>,
	"Yangtao Li" <frank.li@vivo.com>,
	"Richard Weinberger" <richard@nod.at>,
	"Anton Ivanov" <anton.ivanov@cambridgegreys.com>,
	"Johannes Berg" <johannes@sipsolutions.net>,
	"Mikulas Patocka" <mikulas@artax.karlin.mff.cuni.cz>,
	"David Woodhouse" <dwmw2@infradead.org>,
	"Dave Kleikamp" <shaggy@kernel.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Tejun Heo" <tj@kernel.org>,
	"Trond Myklebust" <trondmy@kernel.org>,
	"Anna Schumaker" <anna@kernel.org>,
	"Ryusuke Konishi" <konishi.ryusuke@gmail.com>,
	"Namjae Jeon" <linkinjeon@kernel.org>,
	"Hyunchul Lee" <hyc.lee@gmail.com>,
	"Konstantin Komarov" <almaz.alexandrovich@paragon-software.com>,
	"Mark Fasheh" <mark@fasheh.com>,
	"Joel Becker" <jlbec@evilplan.org>,
	"Joseph Qi" <joseph.qi@linux.alibaba.com>,
	"Heming Zhao" <heming.zhao@suse.com>,
	"Mike Marshall" <hubcap@omnibond.com>,
	"Martin Brandenburg" <martin@omnibond.com>,
	"Amir Goldstein" <amir73il@gmail.com>,
	"Anders Larsen" <al@alarsen.net>,
	"Paulo Alcantara" <pc@manguebit.org>,
	"Ronnie Sahlberg" <ronniesahlberg@gmail.com>,
	"Shyam Prasad N" <sprasad@microsoft.com>,
	"Tom Talpey" <tom@talpey.com>,
	"Bharath SM" <bharathsm@microsoft.com>,
	"Phillip Lougher" <phillip@squashfs.org.uk>,
	"Zhihao Cheng" <chengzhihao1@huawei.com>,
	"Jori Koolstra" <jkoolstra@xs4all.nl>,
	"Damien Le Moal" <dlemoal@kernel.org>,
	"Naohiro Aota" <naohiro.aota@wdc.com>,
	"Johannes Thumshirn" <jth@kernel.org>,
	"Johannes Weiner" <hannes@cmpxchg.org>,
	"Michal Koutný" <mkoutny@suse.com>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/3] fs: return ERR_PTR() from iget_locked() and friends
Date: Tue, 1 Dec 2026 11:09:17 -0500	[thread overview]
Message-ID: <20261201160025.lhxmopbtoo25pjil@cs.cmu.edu> (raw)
In-Reply-To: <cover.1796132090.git.info@massivetech.ru>

On Tue, Dec 01, 2026 at 04:34:50PM +0300, Konstantin Adzer wrote:
> iget_locked(), iget5_locked(), iget5_locked_rcu() and inode_insert5()
> return NULL for a failed allocation and also for an inode under
> creation, which find_inode() and find_inode_fast() report as -ESTALE.
> Callers read NULL as -ENOMEM. As reported in [1], open_by_handle_at() on
> ext4 then fails with ENOMEM, and nfsd returns a jukebox/DELAY error, for
> the handle of a deleted inode whose number is being reused. Following
> the discussion in [2], this series makes the helpers return ERR_PTR().
> 
> Patches 1 and 2 make fuse_iget() and hfs_iget() return ERR_PTR(), so
> that patch 3 can convert the four helpers and all their callers at once.

(I had to remove a bunch of addresses from the CC list because Google
was not allowing me to send my response to 'too many recipients'. sorry
to anyone who got excluded)

I don't like this change because this is an API used by external file
system modules and they are expecting a NULL instead of an ERR_PTR.

Jan


      parent reply	other threads:[~2026-12-01 16:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01 13:34 Konstantin Adzer
2026-12-01 13:06 ` [PATCH 1/3] fuse: return ERR_PTR() from fuse_iget() Konstantin Adzer
2026-12-01 13:06 ` [PATCH 2/3] hfs: return ERR_PTR() from hfs_iget() Konstantin Adzer
2026-12-01 22:18   ` Viacheslav Dubeyko
2026-12-01 13:09 ` [PATCH 3/3] fs: return ERR_PTR() from iget_locked() and friends Konstantin Adzer
2026-12-01 16:09 ` Jan Harkes [this message]

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=20261201160025.lhxmopbtoo25pjil@cs.cmu.edu \
    --to=jaharkes@cs.cmu.edu \
    --cc=adilger.kernel@dilger.ca \
    --cc=agruenba@redhat.com \
    --cc=al@alarsen.net \
    --cc=alison.schofield@intel.com \
    --cc=almaz.alexandrovich@paragon-software.com \
    --cc=amarkuze@redhat.com \
    --cc=amir73il@gmail.com \
    --cc=anna@kernel.org \
    --cc=anton.ivanov@cambridgegreys.com \
    --cc=asmadeus@codewreck.org \
    --cc=bharathsm@microsoft.com \
    --cc=brauner@kernel.org \
    --cc=chao@kernel.org \
    --cc=chengzhihao1@huawei.com \
    --cc=code@tyhicks.com \
    --cc=corbet@lwn.net \
    --cc=dave.jiang@intel.com \
    --cc=dhavale@google.com \
    --cc=dhowells@redhat.com \
    --cc=djbw@kernel.org \
    --cc=dlemoal@kernel.org \
    --cc=dsterba@suse.com \
    --cc=dwmw2@infradead.org \
    --cc=ericvh@kernel.org \
    --cc=frank.li@vivo.com \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=guochunhai@vivo.com \
    --cc=hannes@cmpxchg.org \
    --cc=heming.zhao@suse.com \
    --cc=hongbohbli@tencent.com \
    --cc=hubcap@omnibond.com \
    --cc=hyc.lee@gmail.com \
    --cc=idryomov@gmail.com \
    --cc=info@massivetech.ru \
    --cc=jack@suse.cz \
    --cc=jaegeuk@kernel.org \
    --cc=jefflexu@163.com \
    --cc=jkoolstra@xs4all.nl \
    --cc=jlbec@evilplan.org \
    --cc=johannes@sipsolutions.net \
    --cc=joseph.qi@linux.alibaba.com \
    --cc=jth@kernel.org \
    --cc=konishi.ryusuke@gmail.com \
    --cc=libaokun@linux.alibaba.com \
    --cc=linkinjeon@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux_oss@crudebyte.com \
    --cc=lucho@ionkov.net \
    --cc=luisbg@kernel.org \
    --cc=marc.dionne@auristor.com \
    --cc=mark@fasheh.com \
    --cc=martin@omnibond.com \
    --cc=mason@kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=mikulas@artax.karlin.mff.cuni.cz \
    --cc=mkoutny@suse.com \
    --cc=naohiro.aota@wdc.com \
    --cc=nico@fluxnic.net \
    --cc=ojaswin@linux.ibm.com \
    --cc=pc@manguebit.org \
    --cc=phillip@squashfs.org.uk \
    --cc=rdunlap@infradead.org \
    --cc=richard@nod.at \
    --cc=ritesh.list@gmail.com \
    --cc=ronniesahlberg@gmail.com \
    --cc=salah.triki@gmail.com \
    --cc=shaggy@kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=slava@dubeyko.com \
    --cc=sprasad@microsoft.com \
    --cc=tj@kernel.org \
    --cc=tom@talpey.com \
    --cc=trondmy@kernel.org \
    --cc=tytso@mit.edu \
    --cc=viro@zeniv.linux.org.uk \
    --cc=vishal.l.verma@intel.com \
    --cc=xiang@kernel.org \
    --cc=xiubo.li@clyso.com \
    --cc=yi.zhang@huawei.com \
    --cc=zbestahu@gmail.com \
    /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®