> But it is better to fix them in an independent patch. :)
Yah. Of course. This was completely unrelated.
regards,
dan carpenter
Hi Dan,
On 2018/8/13 20:25, Dan Carpenter wrote:
> On Mon, Aug 13, 2018 at 08:17:27PM +0800, Gao Xiang wrote:
>>> /* we assume that ofs is aligned with 4 bytes */
>>> it->ofs = EROFS_XATTR_ALIGN(it->ofs);
>>> return err;
>>>
> This might be cleaner if we wrote:
>
> return (err <
On 2018/8/13 20:17, Gao Xiang wrote:
>> Generally the rule on likely/unlikely is that they hurt readability so
>> we should only add them if it makes a difference in benchmarking.
>>
>
> In my opinion, return values other than 0 and ENOATTR(ENODATA) rarely happens,
> it should be in the slow path.
Hi Dan,
On 2018/8/13 20:40, Dan Carpenter wrote:
> On Mon, Aug 13, 2018 at 08:17:27PM +0800, Gao Xiang wrote:
@@ -294,8 +322,11 @@ static int inline_getxattr(struct inode *inode,
struct getxattr_iter *it)
ret = xattr_foreach(&it->it, &find_xattr_handlers, &remaining);
>>
On Mon, Aug 13, 2018 at 08:17:27PM +0800, Gao Xiang wrote:
> >> @@ -294,8 +322,11 @@ static int inline_getxattr(struct inode *inode,
> >> struct getxattr_iter *it)
> >>ret = xattr_foreach(&it->it, &find_xattr_handlers, &remaining);
> >>if (ret >= 0)
> >>
On Mon, Aug 13, 2018 at 08:17:27PM +0800, Gao Xiang wrote:
> > /* we assume that ofs is aligned with 4 bytes */
> > it->ofs = EROFS_XATTR_ALIGN(it->ofs);
> > return err;
> >
This might be cleaner if we wrote:
return (err < 0) ? error : 0;
The callers all treate zero and one
Hi Dan,
On 2018/8/13 19:47, Dan Carpenter wrote:
>> -static void xattr_iter_fixup(struct xattr_iter *it)
>> +static inline int xattr_iter_fixup(struct xattr_iter *it)
>> {
>> -if (unlikely(it->ofs >= EROFS_BLKSIZ)) {
>> -xattr_iter_end(it, true);
>> +if (likely(it->ofs < EROFS
> -static void xattr_iter_fixup(struct xattr_iter *it)
> +static inline int xattr_iter_fixup(struct xattr_iter *it)
> {
> - if (unlikely(it->ofs >= EROFS_BLKSIZ)) {
> - xattr_iter_end(it, true);
> + if (likely(it->ofs < EROFS_BLKSIZ))
> + return 0;
>
> -
Hi Xiang,
On 2018/8/13 10:36, Gao Xiang wrote:
> Hi Chao,
>
> On 2018/8/13 10:00, Chao Yu wrote:
>> On 2018/8/12 22:01, Chao Yu wrote:
>>> From: Gao Xiang
>>>
>>> This patch enhances the missing error handling code for
>>> xattr submodule, which improves the stability for the rare cases.
>>>
>>>
Hi Chao,
On 2018/8/13 10:00, Chao Yu wrote:
> On 2018/8/12 22:01, Chao Yu wrote:
>> From: Gao Xiang
>>
>> This patch enhances the missing error handling code for
>> xattr submodule, which improves the stability for the rare cases.
>>
>> Signed-off-by: Gao Xiang
>> Reviewed-by: Chao Yu
>> Signed
On 2018/8/12 22:01, Chao Yu wrote:
> From: Gao Xiang
>
> This patch enhances the missing error handling code for
> xattr submodule, which improves the stability for the rare cases.
>
> Signed-off-by: Gao Xiang
> Reviewed-by: Chao Yu
> Signed-off-by: Chao Yu
> ---
> drivers/staging/erofs/inte
From: Gao Xiang
This patch enhances the missing error handling code for
xattr submodule, which improves the stability for the rare cases.
Signed-off-by: Gao Xiang
Reviewed-by: Chao Yu
Signed-off-by: Chao Yu
---
drivers/staging/erofs/internal.h | 6 +-
drivers/staging/erofs/xattr.c| 120
12 matches
Mail list logo