linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Boxi Liu <boxi10liu@gmail.com>
Cc: "linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>,
	Theodore Tso <tytso@mit.edu>, Robin Dong <sanbai@taobao.com>,
	"tm@tao.ma" <tm@tao.ma>, "lewis.liulei" <lewis.liulei@huawei.com>,
	pamirs <pamirs@163.com>
Subject: Re: fix the ext4_read_inline_dir return value
Date: Tue, 17 Sep 2013 18:29:16 +0200	[thread overview]
Message-ID: <20130917162916.GA16938@quack.suse.cz> (raw)
In-Reply-To: <CAAFszuWi7u_-eYFBB=hvWqfZBcZBhneVK8m6JZhzd9Hakh8oiA@mail.gmail.com>

On Tue 17-09-13 23:08:51, Boxi Liu wrote:
> hi,
> there may be a bug in ext4_read_inline_dir() function with inline_data feature.
> when I recursion call a sys_old_readdir to read a direntry's
> sub_dentry,I find that the ext4_read_inline_dir return the len of the
> inline_data ,but in the no inline_data case,it will return 0.It is
> inconsistent.
> So I try to make a patch to fix it.
  The patch is fine, thanks for finding the bug. But please read
Documentation/SubmittingPatches about how your patch should be formatted.
In particular your patch has damaged whitespace (tabs converted to spaces).
Gmail does this - you have to send the patch as an attachment to avoid this
when using gmail.  Also your patch misses Signed-off-by line.

								Honza
> 
> diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c
> index d9ecbf1..3ea39cd 100644
> --- a/fs/ext4/inline.c
> +++ b/fs/ext4/inline.c
> @@ -1441,7 +1441,7 @@ int ext4_read_inline_dir(struct file *file,
>   up_read(&EXT4_I(inode)->xattr_sem);
>   if (ret < 0)
>   goto out;
> -
> +   ret = 0;
>   sb = inode->i_sb;
>   parent_ino = le32_to_cpu(((struct ext4_dir_entry_2 *)dir_buf)->inode);
>   offset = ctx->pos;
> --
> 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
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR
--
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

  reply	other threads:[~2013-09-17 16:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-17 15:08 fix the ext4_read_inline_dir return value Boxi Liu
2013-09-17 16:29 ` Jan Kara [this message]
2013-09-17 17:30   ` Boxi Liu
2013-09-17 17:38     ` Jan Kara
  -- strict thread matches above, loose matches on Subject: below --
2013-10-21 16:33 Boxi Liu
2013-10-21 17:35 ` jon ernst
2013-10-22  2:10 ` Tao Ma
2013-10-30 12:13   ` Theodore Ts'o
2013-10-31  2:34     ` Tao Ma

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=20130917162916.GA16938@quack.suse.cz \
    --to=jack@suse.cz \
    --cc=boxi10liu@gmail.com \
    --cc=lewis.liulei@huawei.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=pamirs@163.com \
    --cc=sanbai@taobao.com \
    --cc=tm@tao.ma \
    --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 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).