lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 10 Sep 2007 19:33:20 +0900
From:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Cc:	dushistov@...l.ru, LKML <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"nickpiggin@...oo.com.au" <nickpiggin@...oo.com.au>,
	"linux-mm@...ck.org" <linux-mm@...ck.org>
Subject: [PATCH] add page->mapping handling interface [33/35] changes in UFS

Changes  page->mapping handling in UFS

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>

---
 fs/ufs/dir.c  |   10 +++++-----
 fs/ufs/util.c |    2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

Index: test-2.6.23-rc4-mm1/fs/ufs/dir.c
===================================================================
--- test-2.6.23-rc4-mm1.orig/fs/ufs/dir.c
+++ test-2.6.23-rc4-mm1/fs/ufs/dir.c
@@ -42,7 +42,7 @@ static inline int ufs_match(struct super
 
 static int ufs_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;
 
@@ -95,7 +95,7 @@ void ufs_set_link(struct inode *dir, str
 	int err;
 
 	lock_page(page);
-	err = __ufs_write_begin(NULL, page->mapping, pos, len,
+	err = __ufs_write_begin(NULL, page_mapping_cache(page), pos, len,
 				AOP_FLAG_UNINTERRUPTIBLE, &page, NULL);
 	BUG_ON(err);
 
@@ -111,7 +111,7 @@ void ufs_set_link(struct inode *dir, str
 
 static void ufs_check_page(struct page *page)
 {
-	struct inode *dir = page->mapping->host;
+	struct inode *dir = page_inode(page);
 	struct super_block *sb = dir->i_sb;
 	char *kaddr = page_address(page);
 	unsigned offs, rec_len;
@@ -381,7 +381,7 @@ int ufs_add_link(struct dentry *dentry, 
 got_it:
 	pos = page_offset(page) +
 			(char*)de - (char*)page_address(page);
-	err = __ufs_write_begin(NULL, page->mapping, pos, rec_len,
+	err = __ufs_write_begin(NULL, page_mapping_cache(page), pos, rec_len,
 				AOP_FLAG_UNINTERRUPTIBLE, &page, NULL);
 	if (err)
 		goto out_unlock;
@@ -518,7 +518,7 @@ int ufs_delete_entry(struct inode *inode
 		     struct page * page)
 {
 	struct super_block *sb = inode->i_sb;
-	struct address_space *mapping = page->mapping;
+	struct address_space *mapping = page_mapping_cache(page);
 	char *kaddr = page_address(page);
 	unsigned from = ((char*)dir - kaddr) & ~(UFS_SB(sb)->s_uspi->s_dirblksize - 1);
 	unsigned to = ((char*)dir - kaddr) + fs16_to_cpu(sb, dir->d_reclen);
Index: test-2.6.23-rc4-mm1/fs/ufs/util.c
===================================================================
--- test-2.6.23-rc4-mm1.orig/fs/ufs/util.c
+++ test-2.6.23-rc4-mm1/fs/ufs/util.c
@@ -263,7 +263,7 @@ struct page *ufs_get_locked_page(struct 
 
 		lock_page(page);
 
-		if (unlikely(page->mapping == NULL)) {
+		if (unlikely(!page_is_pagecache(page))) {
 			/* Truncate got there first */
 			unlock_page(page);
 			page_cache_release(page);

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ