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]
Message-Id: <20070910185021.a34206eb.kamezawa.hiroyu@jp.fujitsu.com>
Date:	Mon, 10 Sep 2007 18:50:21 +0900
From:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Cc:	sfrench@...ba.org, 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 [6/35] changes in CIFS

Change page->mapping handling in CIFS

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


---
 fs/cifs/file.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Index: test-2.6.23-rc4-mm1/fs/cifs/file.c
===================================================================
--- test-2.6.23-rc4-mm1.orig/fs/cifs/file.c
+++ test-2.6.23-rc4-mm1/fs/cifs/file.c
@@ -1056,7 +1056,7 @@ struct cifsFileInfo *find_writable_file(
 
 static int cifs_partialpagewrite(struct page *page, unsigned from, unsigned to)
 {
-	struct address_space *mapping = page->mapping;
+	struct address_space *mapping = page_mapping_cache(page);
 	loff_t offset = (loff_t)page->index << PAGE_CACHE_SHIFT;
 	char *write_data;
 	int rc = -EFAULT;
@@ -1069,7 +1069,7 @@ static int cifs_partialpagewrite(struct 
 	if (!mapping || !mapping->host)
 		return -EFAULT;
 
-	inode = page->mapping->host;
+	inode = page_inode(page);
 	cifs_sb = CIFS_SB(inode->i_sb);
 	pTcon = cifs_sb->tcon;
 
@@ -1209,7 +1209,7 @@ retry:
 			else if (TestSetPageLocked(page))
 				break;
 
-			if (unlikely(page->mapping != mapping)) {
+			if (unlikely(pagecache_consistent(page, mapping))) {
 				unlock_page(page);
 				break;
 			}
@@ -1371,7 +1371,7 @@ static int cifs_commit_write(struct file
 {
 	int xid;
 	int rc = 0;
-	struct inode *inode = page->mapping->host;
+	struct inode *inode = page_inode(page);
 	loff_t position = ((loff_t)page->index << PAGE_CACHE_SHIFT) + to;
 	char *page_data;
 
@@ -1973,7 +1973,7 @@ static int cifs_prepare_write(struct fil
 	}
 
 	offset = (loff_t)page->index << PAGE_CACHE_SHIFT;
-	i_size = i_size_read(page->mapping->host);
+	i_size = i_size_read(page_inode(page));
 
 	if ((offset >= i_size) ||
 	    ((from == 0) && (offset + to) >= i_size)) {

-
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