Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions drivers/block/loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -1927,7 +1927,7 @@ static void loop_handle_cmd(struct loop_cmd *cmd)

if (write && (lo->lo_flags & LO_FLAGS_READ_ONLY)) {
ret = -EIO;
goto failed;
goto out;
}

/* We can block in this context, so ignore REQ_NOWAIT. */
Expand All @@ -1951,11 +1951,12 @@ static void loop_handle_cmd(struct loop_cmd *cmd)
if (cmd_blkcg_css)
kthread_associate_blkcg(NULL);

if (cmd_memcg_css) {
if (cmd_memcg_css)
set_active_memcg(old_memcg);
out:
if (cmd_memcg_css)
css_put(cmd_memcg_css);
}
failed:

/* complete non-aio request */
if (ret != -EIOCBQUEUED) {
if (ret == -EOPNOTSUPP)
Expand Down
Loading