2.6.5, loop_set_fd()...

From: Yury Umanets
Date: Wed Apr 21 2004 - 02:49:33 EST


Hello all,

I have found small inconsistency in loop_set_fd(). It checks if
->sendfile() is implemented for passed block device file. But in fact,
loop back device driver never calls it. It uses ->sendfile() from
backing store file. See patch.

--- linux-2.6.5/drivers/block/loop.c.orig 2004-04-04
06:37:23.000000000 +0300
+++ linux-2.6.5/drivers/block/loop.c 2004-04-21 10:34:39.066501968
+0300
@@ -646,7 +646,7 @@ static int loop_set_fd(struct loop_devic
* If we can't read - sorry. If we only can't write -
well,
* it's going to be read-only.
*/
- if (!lo_file->f_op->sendfile)
+ if (!file->f_op->sendfile)
goto out_putf;

if (!aops->prepare_write || !aops->commit_write)


Thanks.

--
umka
--
umka

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/