Skip to content

Commit d0f93c0

Browse files
Christoph Hellwigcmaiolino
authored andcommitted
xfs: xfs_qm_dqattach_one is never called with a non-NULL *IO_idqpp
The caller already checks that, so replace the handling of this case with an assert that it does not happen. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Carlos Maiolino <cem@kernel.org>
1 parent 0494f04 commit d0f93c0

2 files changed

Lines changed: 1 addition & 13 deletions

File tree

fs/xfs/xfs_qm.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -297,19 +297,8 @@ xfs_qm_dqattach_one(
297297
struct xfs_dquot *dqp;
298298
int error;
299299

300+
ASSERT(!*IO_idqpp);
300301
xfs_assert_ilocked(ip, XFS_ILOCK_EXCL);
301-
error = 0;
302-
303-
/*
304-
* See if we already have it in the inode itself. IO_idqpp is &i_udquot
305-
* or &i_gdquot. This made the code look weird, but made the logic a lot
306-
* simpler.
307-
*/
308-
dqp = *IO_idqpp;
309-
if (dqp) {
310-
trace_xfs_dqattach_found(dqp);
311-
return 0;
312-
}
313302

314303
/*
315304
* Find the dquot from somewhere. This bumps the reference count of

fs/xfs/xfs_trace.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1399,7 +1399,6 @@ DEFINE_DQUOT_EVENT(xfs_dqadjust);
13991399
DEFINE_DQUOT_EVENT(xfs_dqreclaim_want);
14001400
DEFINE_DQUOT_EVENT(xfs_dqreclaim_busy);
14011401
DEFINE_DQUOT_EVENT(xfs_dqreclaim_done);
1402-
DEFINE_DQUOT_EVENT(xfs_dqattach_found);
14031402
DEFINE_DQUOT_EVENT(xfs_dqattach_get);
14041403
DEFINE_DQUOT_EVENT(xfs_dqalloc);
14051404
DEFINE_DQUOT_EVENT(xfs_dqtobp_read);

0 commit comments

Comments
 (0)