From: Steven Whitehouse <swhiteho@redhat.com>
To: cluster-devel@redhat.com, linux-kernel@vger.kernel.org
Cc: Nate Diller <nate.diller@gmail.com>,
Steven Whitehouse <swhiteho@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH 3/4] [GFS2] use zero_user_page
Date: Mon, 18 Jun 2007 15:54:29 +0100 [thread overview]
Message-ID: <1182178482182-git-send-email-swhiteho@redhat.com> (raw)
In-Reply-To: <11821784801162-git-send-email-swhiteho@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 44 bytes --]
This is a multi-part message in MIME format.
[-- Attachment #2: Type: text/plain, Size: 285 bytes --]
Use zero_user_page() instead of open-coding it.
Signed-off-by: Nate Diller <nate.diller@gmail.com>
Cc: Steven Whitehouse <swhiteho@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
fs/gfs2/bmap.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 5f8edce5584b74bbe25c240ffe7a55934e8cb9de.diff --]
[-- Type: text/x-patch; name="5f8edce5584b74bbe25c240ffe7a55934e8cb9de.diff", Size: 782 bytes --]
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c
index c53a5d2..1c40c4b 100644
--- a/fs/gfs2/bmap.c
+++ b/fs/gfs2/bmap.c
@@ -885,7 +885,6 @@ static int gfs2_block_truncate_page(struct address_space *mapping)
unsigned blocksize, iblock, length, pos;
struct buffer_head *bh;
struct page *page;
- void *kaddr;
int err;
page = grab_cache_page(mapping, index);
@@ -933,10 +932,7 @@ static int gfs2_block_truncate_page(struct address_space *mapping)
if (sdp->sd_args.ar_data == GFS2_DATA_ORDERED || gfs2_is_jdata(ip))
gfs2_trans_add_bh(ip->i_gl, bh, 0);
- kaddr = kmap_atomic(page, KM_USER0);
- memset(kaddr + offset, 0, length);
- flush_dcache_page(page);
- kunmap_atomic(kaddr, KM_USER0);
+ zero_user_page(page, offset, length, KM_USER0);
unlock:
unlock_page(page);
next prev parent reply other threads:[~2007-06-18 15:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-18 14:54 [GFS2/DLM] Some small bug fixes Steven Whitehouse
2007-06-18 14:54 ` [PATCH 1/4] [GFS2] flush the glock completely in inode_go_sync Steven Whitehouse
2007-06-18 14:54 ` [PATCH 2/4] [DLM] fix a couple of races Steven Whitehouse
2007-06-18 14:54 ` Steven Whitehouse [this message]
2007-06-18 14:54 ` [PATCH 4/4] [DLM] keep dlm from panicing when traversing rsb list in debugfs Steven Whitehouse
2007-06-18 15:13 ` [GFS2/DLM] Pull request Steven Whitehouse
2007-06-18 15:30 ` [Cluster-devel] " Steven Whitehouse
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=1182178482182-git-send-email-swhiteho@redhat.com \
--to=swhiteho@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=cluster-devel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nate.diller@gmail.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
Powered by JetHome