From: Jan Kara <jack@suse.cz>
To: Dmitry Monakhov <dmonakhov@openvz.org>
Cc: linux-ext4@vger.kernel.org, jack@suse.cz
Subject: Re: [PATCH] ext3: add writepage sanity checks
Date: Wed, 3 Mar 2010 09:01:15 +0100 [thread overview]
Message-ID: <20100303080115.GB6290@quack.suse.cz> (raw)
In-Reply-To: <1267534262-13196-1-git-send-email-dmonakhov@openvz.org>
On Tue 02-03-10 15:51:02, Dmitry Monakhov wrote:
> - There is theoretical possibility to perform writepage on
> RO superblock. Add explicit check for what case.
> - Page must being locked before writepage.
Thanks. Merged into my tree.
Honza
>
> Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
> ---
> fs/ext3/inode.c | 7 +++++++
> 1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c
> index 8ac4acf..14d40a4 100644
> --- a/fs/ext3/inode.c
> +++ b/fs/ext3/inode.c
> @@ -1528,6 +1528,7 @@ static int ext3_ordered_writepage(struct page *page,
> int err;
>
> J_ASSERT(PageLocked(page));
> + WARN_ON_ONCE(IS_RDONLY(inode));
>
> /*
> * We give up here if we're reentered, because it might be for a
> @@ -1600,6 +1601,9 @@ static int ext3_writeback_writepage(struct page *page,
> int ret = 0;
> int err;
>
> + J_ASSERT(PageLocked(page));
> + WARN_ON_ONCE(IS_RDONLY(inode));
> +
> if (ext3_journal_current_handle())
> goto out_fail;
>
> @@ -1642,6 +1646,9 @@ static int ext3_journalled_writepage(struct page *page,
> int ret = 0;
> int err;
>
> + J_ASSERT(PageLocked(page));
> + WARN_ON_ONCE(IS_RDONLY(inode));
> +
> if (ext3_journal_current_handle())
> goto no_write;
>
> --
> 1.6.6
>
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
prev parent reply other threads:[~2010-03-03 8:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-02 12:51 [PATCH] ext3: add writepage sanity checks Dmitry Monakhov
2010-03-03 8:01 ` Jan Kara [this message]
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=20100303080115.GB6290@quack.suse.cz \
--to=jack@suse.cz \
--cc=dmonakhov@openvz.org \
--cc=linux-ext4@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;
as well as URLs for NNTP newsgroup(s).