Re: [PATCH][BUG] ext4: fix returning with 0 from write system call on ext4 with noextent

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

 



On 2010-07-25, at 20:16, Toshiyuki Okajima <toshi.okajima@xxxxxxxxxxxxxx> wrote:
> 
> -        if (pos > sbi->s_bitmap_maxbytes)
> +        if (pos > sbi->s_bitmap_maxbytes
> +           || (pos == sbi->s_bitmap_maxbytes && length > 0))
>            return -EFBIG;

Minor note - the kernel coding style is to put the '||' at the end of the first line instead of the start of the second line. 

I thunk it would also be sufficient to do:

        if (pos > sbi->s_bitmap_maxbytes + !!length)
                 return -EFBIG;--
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