From: Arkadiusz Miskiewicz <a.miskiewicz@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: Re: Linux 2.6.27.26
Date: Fri, 3 Jul 2009 08:52:24 +0200 [thread overview]
Message-ID: <200907030852.24912.a.miskiewicz@gmail.com> (raw)
In-Reply-To: <20090703000722.GB17190@kroah.com>
On Friday 03 of July 2009, Greg KH wrote:
Isn't this part broken?
The code in 2.6.27 already has such thing and new code is trying to return
NULL even if function returns int
static int dm_blk_open(struct inode *inode, struct file *file)
{
struct mapped_device *md;
spin_lock(&_minor_lock);
md = inode->i_bdev->bd_disk->private_data;
if (!md)
goto out;
if (test_bit(DMF_FREEING, &md->flags) ||
test_bit(DMF_DELETING, &md->flags)) {
md = NULL;
goto out;
}
dm_get(md);
atomic_inc(&md->open_count);
out:
spin_unlock(&_minor_lock);
return md ? 0 : -ENXIO;
}
> diff --git a/drivers/md/dm.c b/drivers/md/dm.c
> index ace998c..925efaf 100644
> --- a/drivers/md/dm.c
> +++ b/drivers/md/dm.c
> @@ -265,6 +265,10 @@ static int dm_blk_open(struct inode *inode, struct
> file *file) goto out;
> }
>
> + if (test_bit(DMF_FREEING, &md->flags) ||
> + test_bit(DMF_DELETING, &md->flags))
> + return NULL;
> +
> dm_get(md);
> atomic_inc(&md->open_count);
>
--
Arkadiusz Miśkiewicz PLD/Linux Team
arekm / maven.pl http://ftp.pld-linux.org/
next prev parent reply other threads:[~2009-07-03 6:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-03 0:07 Greg KH
2009-07-03 0:07 ` Greg KH
2009-07-03 6:52 ` Arkadiusz Miskiewicz [this message]
2009-07-03 14:47 ` Milan Broz
2009-07-20 3:55 ` Greg KH
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=200907030852.24912.a.miskiewicz@gmail.com \
--to=a.miskiewicz@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome