jbd: remove the second argument of k[un]map_atomic()
authorCong Wang <amwang@redhat.com>
Fri, 25 Nov 2011 15:14:31 +0000 (23:14 +0800)
committerCong Wang <xiyou.wangcong@gmail.com>
Tue, 20 Mar 2012 13:48:23 +0000 (21:48 +0800)
Acked-by: Jan Kara <jack@suse.cz>
Signed-off-by: Cong Wang <amwang@redhat.com>
fs/jbd/journal.c
fs/jbd/transaction.c

index 59c09f9541b5923c08ad1d227120dca764f8facf..e49e81bb80ef76feafe8054e04b717f547699505 100644 (file)
@@ -328,7 +328,7 @@ repeat:
                new_offset = offset_in_page(jh2bh(jh_in)->b_data);
        }
 
-       mapped_data = kmap_atomic(new_page, KM_USER0);
+       mapped_data = kmap_atomic(new_page);
        /*
         * Check for escaping
         */
@@ -337,7 +337,7 @@ repeat:
                need_copy_out = 1;
                do_escape = 1;
        }
-       kunmap_atomic(mapped_data, KM_USER0);
+       kunmap_atomic(mapped_data);
 
        /*
         * Do we need to do a data copy?
@@ -354,9 +354,9 @@ repeat:
                }
 
                jh_in->b_frozen_data = tmp;
-               mapped_data = kmap_atomic(new_page, KM_USER0);
+               mapped_data = kmap_atomic(new_page);
                memcpy(tmp, mapped_data + new_offset, jh2bh(jh_in)->b_size);
-               kunmap_atomic(mapped_data, KM_USER0);
+               kunmap_atomic(mapped_data);
 
                new_page = virt_to_page(tmp);
                new_offset = offset_in_page(tmp);
@@ -368,9 +368,9 @@ repeat:
         * copying, we can finally do so.
         */
        if (do_escape) {
-               mapped_data = kmap_atomic(new_page, KM_USER0);
+               mapped_data = kmap_atomic(new_page);
                *((unsigned int *)(mapped_data + new_offset)) = 0;
-               kunmap_atomic(mapped_data, KM_USER0);
+               kunmap_atomic(mapped_data);
        }
 
        set_bh_page(new_bh, new_page, new_offset);
index 7fce94b04bc3368e83fc929135f1b57c0bd1e2e6..b2a7e5244e394d4bf88bcd4d8156d108d5d772e8 100644 (file)
@@ -718,9 +718,9 @@ done:
                            "Possible IO failure.\n");
                page = jh2bh(jh)->b_page;
                offset = offset_in_page(jh2bh(jh)->b_data);
-               source = kmap_atomic(page, KM_USER0);
+               source = kmap_atomic(page);
                memcpy(jh->b_frozen_data, source+offset, jh2bh(jh)->b_size);
-               kunmap_atomic(source, KM_USER0);
+               kunmap_atomic(source);
        }
        jbd_unlock_bh_state(bh);