[PATCH] add page->mapping handling interface [31/35] changes in SYSVFS

2007-09-10 Thread KAMEZAWA Hiroyuki
Changes page->mapping handlingi in SYSVFS.

Signed-off-by: KAMEZAWA Hiroyuki <[EMAIL PROTECTED]>

---
 fs/sysv/dir.c |9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

Index: test-2.6.23-rc4-mm1/fs/sysv/dir.c
===
--- test-2.6.23-rc4-mm1.orig/fs/sysv/dir.c
+++ test-2.6.23-rc4-mm1/fs/sysv/dir.c
@@ -40,7 +40,7 @@ static inline unsigned long dir_pages(st
 
 static int dir_commit_chunk(struct page *page, loff_t pos, unsigned len)
 {
-   struct address_space *mapping = page->mapping;
+   struct address_space *mapping = page_mapping_cache(page);
struct inode *dir = mapping->host;
int err = 0;
 
@@ -221,7 +221,8 @@ got_it:
pos = page_offset(page) +
(char*)de - (char*)page_address(page);
lock_page(page);
-   err = __sysv_write_begin(NULL, page->mapping, pos, SYSV_DIRSIZE,
+   err = __sysv_write_begin(NULL, page_mapping_cache(page),
+   pos, SYSV_DIRSIZE,
AOP_FLAG_UNINTERRUPTIBLE, , NULL);
if (err)
goto out_unlock;
@@ -242,7 +243,7 @@ out_unlock:
 
 int sysv_delete_entry(struct sysv_dir_entry *de, struct page *page)
 {
-   struct address_space *mapping = page->mapping;
+   struct address_space *mapping = page_mapping_cache(page);
struct inode *inode = (struct inode*)mapping->host;
char *kaddr = (char*)page_address(page);
loff_t pos = page_offset(page) + (char *)de - kaddr;
@@ -344,7 +345,7 @@ not_empty:
 void sysv_set_link(struct sysv_dir_entry *de, struct page *page,
struct inode *inode)
 {
-   struct address_space *mapping = page->mapping;
+   struct address_space *mapping = page_mapping_cache(page);
struct inode *dir = mapping->host;
loff_t pos = page_offset(page) +
(char *)de-(char*)page_address(page);


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] add page-mapping handling interface [31/35] changes in SYSVFS

2007-09-10 Thread KAMEZAWA Hiroyuki
Changes page-mapping handlingi in SYSVFS.

Signed-off-by: KAMEZAWA Hiroyuki [EMAIL PROTECTED]

---
 fs/sysv/dir.c |9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

Index: test-2.6.23-rc4-mm1/fs/sysv/dir.c
===
--- test-2.6.23-rc4-mm1.orig/fs/sysv/dir.c
+++ test-2.6.23-rc4-mm1/fs/sysv/dir.c
@@ -40,7 +40,7 @@ static inline unsigned long dir_pages(st
 
 static int dir_commit_chunk(struct page *page, loff_t pos, unsigned len)
 {
-   struct address_space *mapping = page-mapping;
+   struct address_space *mapping = page_mapping_cache(page);
struct inode *dir = mapping-host;
int err = 0;
 
@@ -221,7 +221,8 @@ got_it:
pos = page_offset(page) +
(char*)de - (char*)page_address(page);
lock_page(page);
-   err = __sysv_write_begin(NULL, page-mapping, pos, SYSV_DIRSIZE,
+   err = __sysv_write_begin(NULL, page_mapping_cache(page),
+   pos, SYSV_DIRSIZE,
AOP_FLAG_UNINTERRUPTIBLE, page, NULL);
if (err)
goto out_unlock;
@@ -242,7 +243,7 @@ out_unlock:
 
 int sysv_delete_entry(struct sysv_dir_entry *de, struct page *page)
 {
-   struct address_space *mapping = page-mapping;
+   struct address_space *mapping = page_mapping_cache(page);
struct inode *inode = (struct inode*)mapping-host;
char *kaddr = (char*)page_address(page);
loff_t pos = page_offset(page) + (char *)de - kaddr;
@@ -344,7 +345,7 @@ not_empty:
 void sysv_set_link(struct sysv_dir_entry *de, struct page *page,
struct inode *inode)
 {
-   struct address_space *mapping = page-mapping;
+   struct address_space *mapping = page_mapping_cache(page);
struct inode *dir = mapping-host;
loff_t pos = page_offset(page) +
(char *)de-(char*)page_address(page);


-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/