public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] exofs: confusion between kmap() and kmap_atomic() api
@ 2010-05-07  9:05 Dan Carpenter
  2010-05-09 10:16 ` Boaz Harrosh
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Carpenter @ 2010-05-07  9:05 UTC (permalink / raw)
  To: Boaz Harrosh; +Cc: Benny Halevy, Avishay Traeger, osd-dev, linux-kernel

For kmap_atomic() we call kunmap_atomic() on the returned pointer.
That's different from kmap() and kunmap() and so it's easy to get them
backwards.

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/fs/exofs/dir.c b/fs/exofs/dir.c
index 4cfab1c..d91e9d8 100644
--- a/fs/exofs/dir.c
+++ b/fs/exofs/dir.c
@@ -608,7 +608,7 @@ int exofs_make_empty(struct inode *inode, struct inode *parent)
 	de->inode_no = cpu_to_le64(parent->i_ino);
 	memcpy(de->name, PARENT_DIR, sizeof(PARENT_DIR));
 	exofs_set_de_type(de, inode);
-	kunmap_atomic(page, KM_USER0);
+	kunmap_atomic(kaddr, KM_USER0);
 	err = exofs_commit_chunk(page, 0, chunk_size);
 fail:
 	page_cache_release(page);

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-05-11  8:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-07  9:05 [patch] exofs: confusion between kmap() and kmap_atomic() api Dan Carpenter
2010-05-09 10:16 ` Boaz Harrosh
2010-05-10 16:15   ` Dan Carpenter
2010-05-10 23:03   ` Andrew Morton
2010-05-11  8:05     ` Boaz Harrosh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox