Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit eefe85ee authored by Constantine Sapuntzakis's avatar Constantine Sapuntzakis Committed by Linus Torvalds
Browse files

[PATCH] drivers/block/loop.c: don't return garbage if LOOP_SET_STATUS not called



While writing a version of losetup, I ran into the problem that the loop
device was returning total garbage.

It turns out the problem was that this losetup was only issuing the
LOOP_SET_FD ioctl and not issuing a subsequent LOOP_SET_STATUS ioctl.  This
losetup didn't have any special status to set, so it left out the call.

The deeper cause is that loop_set_fd sets the transfer function to NULL,
which causes no transfer to happen lo_do_transfer.

This patch fixes the problem by setting transfer to transfer_none in
loop_set_fd.

Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 98bd34ea
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment