From: Steven Whitehouse <swhiteho@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] Re: Fix typo in gfs_page_mkwrite()
Date: Tue, 06 Jan 2009 16:49:59 +0000 [thread overview]
Message-ID: <1231260599.9571.488.camel@quoit> (raw)
In-Reply-To: <20090106164750.GX1585@ether.msp.redhat.com>
Hi,
Now in the GFS2 -nmw git tree. Thanks,
Steve.
On Tue, 2009-01-06 at 10:47 -0600, Benjamin Marzinski wrote:
> There is a typo in gfs2_page_mkwrite()
>
> gfs2_write_alloc_required() expects pos to be the offset in bytes. However,
> instead of the page index being shifted by by PAGE_CACHE_SHIFT, it was shifted
> by (PAGE_CACHE_SIZE - inode->i_blkbits). This patch simply shifts the page
> index by the proper amount.
>
> Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
> ---
> fs/gfs2/ops_file.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: kernel-315191/fs/gfs2/ops_file.c
> ===================================================================
> --- kernel-315191.orig/fs/gfs2/ops_file.c
> +++ kernel-315191/fs/gfs2/ops_file.c
> @@ -342,7 +342,7 @@ static int gfs2_page_mkwrite(struct vm_a
> struct gfs2_inode *ip = GFS2_I(inode);
> struct gfs2_sbd *sdp = GFS2_SB(inode);
> unsigned long last_index;
> - u64 pos = page->index << (PAGE_CACHE_SIZE - inode->i_blkbits);
> + u64 pos = page->index << PAGE_CACHE_SHIFT;
> unsigned int data_blocks, ind_blocks, rblocks;
> int alloc_required = 0;
> struct gfs2_holder gh;
prev parent reply other threads:[~2009-01-06 16:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-06 16:47 [Cluster-devel] Fix typo in gfs_page_mkwrite() Benjamin Marzinski
2009-01-06 16:49 ` Steven Whitehouse [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1231260599.9571.488.camel@quoit \
--to=swhiteho@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).