[PATCH 9/9] convert fs/jbd to virt_to_pageoff()

From: YOSHIFUJI Hideaki / 吉藤英明
Date: Sun Aug 10 2003 - 06:18:38 EST


[9/9] convert fs/jbd to virt_to_pageoff().

Index: linux-2.6/fs/jbd/journal.c
===================================================================
RCS file: /home/cvs/linux-2.5/fs/jbd/journal.c,v
retrieving revision 1.62
diff -u -r1.62 journal.c
--- linux-2.6/fs/jbd/journal.c 11 Jul 2003 07:04:11 -0000 1.62
+++ linux-2.6/fs/jbd/journal.c 10 Aug 2003 08:40:54 -0000
@@ -278,9 +278,6 @@
* Bit 1 set == buffer copy-out performed (kfree the data after IO)
*/

-static inline unsigned long virt_to_offset(void *p)
-{return ((unsigned long) p) & ~PAGE_MASK;}
-
int journal_write_metadata_buffer(transaction_t *transaction,
struct journal_head *jh_in,
struct journal_head **jh_out,
@@ -318,10 +315,10 @@
if (jh_in->b_frozen_data) {
done_copy_out = 1;
new_page = virt_to_page(jh_in->b_frozen_data);
- new_offset = virt_to_offset(jh_in->b_frozen_data);
+ new_offset = virt_to_pageoff(jh_in->b_frozen_data);
} else {
new_page = jh2bh(jh_in)->b_page;
- new_offset = virt_to_offset(jh2bh(jh_in)->b_data);
+ new_offset = virt_to_pageoff(jh2bh(jh_in)->b_data);
}

mapped_data = kmap_atomic(new_page, KM_USER0);
@@ -358,7 +355,7 @@
address kmapped so that we can clear the escaped
magic number below. */
new_page = virt_to_page(tmp);
- new_offset = virt_to_offset(tmp);
+ new_offset = virt_to_pageoff(tmp);
done_copy_out = 1;
}


--
Hideaki YOSHIFUJI @ USAGI Project <yoshfuji@xxxxxxxxxxxxxx>
GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/