From: "Takashi Sato" <t-sato@yk.jp.nec.com>
To: "Andrew Morton" <akpm@linux-foundation.org>
Cc: axboe@kernel.dk, mtk.manpages@googlemail.com,
linux-kernel@vger.kernel.org, xfs@oss.sgi.com,
Christoph Hellwig <hch@infradead.org>,
dm-devel@redhat.com, viro@ZenIV.linux.org.uk,
linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org
Subject: Re: [PATCH 2/3] Implement generic freeze feature
Date: Tue, 28 Oct 2008 21:33:59 +0900 [thread overview]
Message-ID: <F69DB5CD5C544C428676CFA36F31FF26@nsl.ad.nec.co.jp> (raw)
In-Reply-To: <20081027231533.96c42a78.akpm@linux-foundation.org>
Hi,
>> -void thaw_bdev(struct block_device *bdev, struct super_block *sb)
>> +int thaw_bdev(struct block_device *bdev, struct super_block *sb)
>> {
>> + int error = 0;
>> +
>> + mutex_lock(&bdev->bd_fsfreeze_mutex);
>> + if (!bdev->bd_fsfreeze_count) {
>> + mutex_unlock(&bdev->bd_fsfreeze_mutex);
>> + return -EINVAL;
>
> This would be a programming error, yes?
This is not a kernel programming error but a user's.
thaw_bdev() is called via the unfreeze ioctl. If a user calls the unfreeze
ioctl for an unfrozen filesystem, this error will be returned.
So a WARN_ON isn't needed.
> If so, a WARN_ON is more appropriate than a silent runtime error.
>
>> + }
Cheers, Takashi
next prev parent reply other threads:[~2008-10-28 12:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20081027215855t-sato@mail.jp.nec.com>
2008-10-28 6:15 ` [PATCH 2/3] Implement generic freeze feature Andrew Morton
2008-10-28 12:33 ` Takashi Sato [this message]
2008-10-27 12:58 Takashi Sato
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=F69DB5CD5C544C428676CFA36F31FF26@nsl.ad.nec.co.jp \
--to=t-sato@yk.jp.nec.com \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=dm-devel@redhat.com \
--cc=hch@infradead.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mtk.manpages@googlemail.com \
--cc=viro@ZenIV.linux.org.uk \
--cc=xfs@oss.sgi.com \
/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