[Ocfs2-devel] [PATCH v2] ocfs2: Don't duplicate page passes i_size during CoW.
Joel Becker
Joel.Becker at oracle.com
Tue Jul 13 01:13:07 PDT 2010
On Tue, Jul 13, 2010 at 11:22:32AM +0800, Tao Ma wrote:
> + /*
> + * We only duplicate pages until we reach i_size.
> + * So trim 'end' to the boundary of that page.
> + */
> + if (end > i_size_read(context->inode))
> + end = ((i_size_read(context->inode) + PAGE_CACHE_SIZE - 1) >>
> + PAGE_CACHE_SHIFT) << PAGE_CACHE_SHIFT;
Just use PAGE_CACHE_ALIGN().
Joel
--
"Any man who is under 30, and is not a liberal, has not heart;
and any man who is over 30, and is not a conservative, has no brains."
- Sir Winston Churchill
Joel Becker
Consulting Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127
More information about the Ocfs2-devel
mailing list