From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Shen Feng <shen@cn.fujitsu.com>
Cc: linux-ext4@vger.kernel.org, Mingming Cao <cmm@us.ibm.com>,
Theodore Tso <tytso@MIT.EDU>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [Fwd: [PATCH 2/5] ext4: Change the return value of ext4_ext_journal_restart]
Date: Wed, 11 Jun 2008 17:06:53 +0530 [thread overview]
Message-ID: <20080611113653.GE9008@skywalker> (raw)
In-Reply-To: <484F690D.9090004@cn.fujitsu.com>
On Wed, Jun 11, 2008 at 01:56:29PM +0800, Shen Feng wrote:
>
> ext4_ext_journal_restart does not return the return value
> of ext4_journal_extend and ext4_journal_restart.
> Fix it.
>
> Signed-off-by: Shen Feng <shen@cn.fujitsu.com>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
We also need to update the defrag patches in the patchqueue to take care
of the change
> ---
> fs/ext4/extents.c | 19 ++++++++-----------
> 1 files changed, 8 insertions(+), 11 deletions(-)
>
> diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
> index fa8a578..d4f76d7 100644
> --- a/fs/ext4/extents.c
> +++ b/fs/ext4/extents.c
> @@ -92,17 +92,16 @@ static void ext4_idx_store_pblock(struct ext4_extent_idx *ix, ext4_fsblk_t pb)
> ix->ei_leaf_hi = cpu_to_le16((unsigned long) ((pb >> 31) >> 1) & 0xffff);
> }
>
> -static handle_t *ext4_ext_journal_restart(handle_t *handle, int needed)
> +static int ext4_ext_journal_restart(handle_t *handle, int needed)
> {
> int err;
>
> if (handle->h_buffer_credits > needed)
> - return handle;
> - if (!ext4_journal_extend(handle, needed))
> - return handle;
> - err = ext4_journal_restart(handle, needed);
> -
> - return handle;
> + return 0;
> + err = ext4_journal_extend(handle, needed);
> + if (err)
> + return err;
> + return ext4_journal_restart(handle, needed);
> }
>
> /*
> @@ -1885,11 +1884,9 @@ ext4_ext_rm_leaf(handle_t *handle, struct inode *inode,
> credits += 2 * EXT4_QUOTA_TRANS_BLOCKS(inode->i_sb);
> #endif
>
> - handle = ext4_ext_journal_restart(handle, credits);
> - if (IS_ERR(handle)) {
> - err = PTR_ERR(handle);
> + err = ext4_ext_journal_restart(handle, credits);
> + if (err)
> goto out;
> - }
>
> err = ext4_ext_get_access(handle, inode, path + depth);
> if (err)
> --
> 1.5.4.5
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2008-06-11 11:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-11 5:56 [Fwd: [PATCH 2/5] ext4: Change the return value of ext4_ext_journal_restart] Shen Feng
2008-06-11 11:36 ` Aneesh Kumar K.V [this message]
2008-06-12 22:49 ` Mingming Cao
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=20080611113653.GE9008@skywalker \
--to=aneesh.kumar@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=cmm@us.ibm.com \
--cc=linux-ext4@vger.kernel.org \
--cc=shen@cn.fujitsu.com \
--cc=tytso@MIT.EDU \
/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.