From: franz_pletz@t-online.de (Franz Pletz)
To: Phil Oester <kernel@linuxace.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
Jens Axboe <axboe@suse.de>, Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH] loopback device can't act as its backing store
Date: Fri, 3 Dec 2004 23:31:58 +0100 [thread overview]
Message-ID: <20041203233158.41595f46@sgx.home> (raw)
In-Reply-To: <20041203214238.GA23245@linuxace.com>
On Fri, 3 Dec 2004 13:42:38 -0800, Phil Oester <kernel@linuxace.com> wrote:
> Your mailer mangled the patch.
Thanks for your feedback.
I apologize for any inconvenience at applying or evaluating the patch.
I think I got it now. Let's give it another try.
Signed-off-by: Franz Pletz <franz_pletz@t-online.de>
linux/drivers/block/loop.c | 7 +++++++
1 files changed, 7 insertions(+)
--- linux-2.6.10-rc2/drivers/block/loop.c 2004-11-25 19:56:32.000000000 +0100
+++ linux/drivers/block/loop.c 2004-12-02 23:39:43.516913144 +0100
@@ -596,6 +596,9 @@
old_file = lo->lo_backing_file;
error = -EINVAL;
+ /* new backing store mustn't be the loop device it's being mapped to */
+ if(inode->i_rdev == bdev->bd_dev)
+ goto out_putf;
if (!S_ISREG(inode->i_mode) && !S_ISBLK(inode->i_mode))
goto out_putf;
@@ -652,6 +655,10 @@
lo_flags |= LO_FLAGS_READ_ONLY;
error = -EINVAL;
+ /* new backing store mustn't be the loop device it's being mapped to */
+ if(inode->i_rdev == bdev->bd_dev)
+ goto out_putf;
+
if (S_ISREG(inode->i_mode) || S_ISBLK(inode->i_mode)) {
struct address_space_operations *aops = mapping->a_ops;
/*
next prev parent reply other threads:[~2004-12-03 22:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-03 19:51 [PATCH] loopback device can't act as its backing store Franz Pletz
2004-12-03 21:42 ` Phil Oester
2004-12-03 22:31 ` Franz Pletz [this message]
2004-12-03 22:50 ` Andrew Morton
2004-12-03 22:51 ` Andrew Morton
2004-12-04 0:34 ` Franz Pletz
[not found] <fa.gge7q0c.1pjgej6@ifi.uio.no>
[not found] ` <fa.gbb6job.1um2er1@ifi.uio.no>
2004-12-04 0:25 ` Bodo Eggert
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=20041203233158.41595f46@sgx.home \
--to=franz_pletz@t-online.de \
--cc=akpm@osdl.org \
--cc=axboe@suse.de \
--cc=kernel@linuxace.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.