[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250528213603.222063-1-yikangy2@illinois.edu>
Date: Wed, 28 May 2025 16:36:03 -0500
From: Yikang Yue <yikangy2@...inois.edu>
To: viro@...iv.linux.org.uk
Cc: mikulas@...ax.karlin.mff.cuni.cz, linux-kernel@...r.kernel.org,
yikangy2@...inois.edu, shaobol2@...inois.edu, yiruiz2@...inois.edu,
jianh@...inois.edu
Subject: Re: [PATCH] fs/hpfs: Fix error code for new_inode() failure in mkdir/create/mknod/symlink
Sorry for the late reply.
On Sun, May 04, 2025 at 03:23:00AM +0000, Al Viro wrote:
> Frankly, that amount of boilerplate is begging for a helper function...
Could you clarify whether you meant:
(1) Simplify the patch we already submitted by introducing
a helper function, or
(2) Simplify the implementations of mkdir/create/mknod/symlink
by extracting a common helper?
For option 1, the current -ENOMEM fix is intentionally minimal,
but we can certainly wrap the logic in something like:
hpfs_new_inode(dir->i_sb, &err);
to conduct the error code assignment within the helper function.
If you had option 2 in mind, our plan would be to
first correct the other similar error-code inconsistencies and
then consider extracting a helper function to reduce duplication.
Powered by blists - more mailing lists