Re: [PATCH, RESEND] tmpfs: fix mounts when size is less than the page size

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

 



On Sun, 4 Nov 2007, Michael Marineau wrote:
> On 11/4/07, Hugh Dickins <[email protected]> wrote:
> > Fair enough, that does match the documentation of "size=0" better.
> > Though either way, someone who typos is going to get one kind of surprise
> > or another.  Do you mind if we do it slightly differently, achieving the
> > same effect without a special case, by rounding up instead of down?
> 
> Sounds reasonable to me. I didn't know about DIV_ROUND_UP :-)

I'm not familiar with it either (had to look it up to check it's
the right thing) - in mm/ we're accustomed to writing things like
"(size + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT"; but that took
the line over 80 columns, and I dreaded someone somewhere mailing
in to ask "Why didn't you use DIV_ROUND_UP?" ;-)

Hugh
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux