public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Yury Umanets <torque@ukrpost.net>
To: Linux Kernel ML <linux-kernel@vger.kernel.org>
Cc: akpm@osdl.org
Subject: 2.6.5, loop_set_fd()...
Date: Wed, 21 Apr 2004 10:51:11 +0300	[thread overview]
Message-ID: <1082533853.2589.77.camel@firefly> (raw)

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


                 reply	other threads:[~2004-04-21  7:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1082533853.2589.77.camel@firefly \
    --to=torque@ukrpost.net \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox