Skip to content

Commit 6a2fa6b

Browse files
committed
Merge: loop: use kiocb helpers to fix lockdep warning
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/7204 loop: use kiocb helpers to fix lockdep warning JIRA: https://issues.redhat.com/browse/RHEL-104374 Signed-off-by: Ming Lei <[email protected]> Approved-by: Jeff Moyer <[email protected]> Approved-by: Maurizio Lombardi <[email protected]> Approved-by: CKI KWF Bot <[email protected]> Merged-by: Jarod Wilson <[email protected]>
2 parents 7c28361 + 2fe5143 commit 6a2fa6b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/block/loop.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,14 +332,13 @@ static void lo_complete_rq(struct request *rq)
332332
static void lo_rw_aio_do_completion(struct loop_cmd *cmd)
333333
{
334334
struct request *rq = blk_mq_rq_from_pdu(cmd);
335-
struct loop_device *lo = rq->q->queuedata;
336335

337336
if (!atomic_dec_and_test(&cmd->ref))
338337
return;
339338
kfree(cmd->bvec);
340339
cmd->bvec = NULL;
341340
if (req_op(rq) == REQ_OP_WRITE)
342-
file_end_write(lo->lo_backing_file);
341+
kiocb_end_write(&cmd->iocb);
343342
if (likely(!blk_should_fake_timeout(rq->q)))
344343
blk_mq_complete_request(rq);
345344
}
@@ -415,7 +414,7 @@ static int lo_rw_aio(struct loop_device *lo, struct loop_cmd *cmd,
415414
}
416415

417416
if (rw == ITER_SOURCE) {
418-
file_start_write(lo->lo_backing_file);
417+
kiocb_start_write(&cmd->iocb);
419418
ret = call_write_iter(file, &cmd->iocb, &iter);
420419
} else
421420
ret = call_read_iter(file, &cmd->iocb, &iter);

0 commit comments

Comments
 (0)