]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
exofs: confusion between kmap() and kmap_atomic() api
authorDan Carpenter <error27@gmail.com>
Fri, 7 May 2010 09:05:33 +0000 (11:05 +0200)
committerBoaz Harrosh <bharrosh@panasas.com>
Mon, 17 May 2010 10:50:58 +0000 (13:50 +0300)
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.

Cc: Stable <stable@kernel.org>
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
fs/exofs/dir.c

index 4cfab1cc75c03a0bb7654e5c8150c2009fe4aa11..d91e9d829bc1bcc52cce4c4965d375a3eb7d356f 100644 (file)
@@ -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);