Re: fix the ext4_read_inline_dir return value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/30/2013 08:13 PM, Theodore Ts'o wrote:
> Applied, thanks.
> 
> On Tue, Oct 22, 2013 at 10:10:27AM +0800, Tao Ma wrote:
>> But next time please generate the patch with git format-patch and send
>> it using git send-email.
> 
> Yes, please.  :-)
> 
> I've reworded the commit description a little.
> 
>     In ext4_read_inline_dir(), if there is inline data, the successful
>     return value is the return value of ext4_read_inline_data().  Howewer,
>     this is used by ext4_readdir(), and while it seems harmless to return
>     a positive value on success, it's inconsistent, since historically
>     we've always return 0 on success.
>     
> 
> BTW, it looks like it would simplify the code a bit to change
> ext4_read_inline_page() and ext4_read_line_data() to return 0 on
> success, since it looks like the positive value on success isn't
> needed anywhere, and this would allow us to remove lines such as this:
> 
>        return ret >= 0 ? 0 : ret;
> 
> as well as the forced ret = 0; in this commit.
> 
> Could you take a look and verify that this is true, and I haven't
> missed anything?
sure, I will look into it.
> 
> Also, it would be nice if the functions in fs/ext4/inline.c documented
> what the return values are for each of the functions, one way or
> another.
OK, I will try to generate a patch for it.

Thanks,

Tao
> 
> Thanks!!
> 
> 						- Ted
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux