patch-2.1.81 linux/fs/smbfs/file.c

Next file: linux/fs/smbfs/inode.c
Previous file: linux/fs/smbfs/dir.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.80/linux/fs/smbfs/file.c linux/fs/smbfs/file.c
@@ -54,10 +54,9 @@
 static int
 smb_readpage_sync(struct dentry *dentry, struct page *page)
 {
-	struct inode *inode = dentry->d_inode;
 	char *buffer = (char *) page_address(page);
 	unsigned long offset = page->offset;
-	int rsize = smb_get_rsize(SMB_SERVER(inode));
+	int rsize = smb_get_rsize(server_from_dentry(dentry));
 	int count = PAGE_SIZE;
 	int result;
 
@@ -81,14 +80,14 @@
 		if (count < rsize)
 			rsize = count;
 
-		result = smb_proc_read(inode, offset, rsize, buffer);
+		result = smb_proc_read(dentry, offset, rsize, buffer);
 		if (result < 0)
 			goto io_error;
 
 		count -= result;
 		offset += result;
 		buffer += result;
-		inode->i_atime = CURRENT_TIME;
+		dentry->d_inode->i_atime = CURRENT_TIME;
 		if (result < rsize)
 			break;
 	} while (count);
@@ -129,7 +128,7 @@
 {
 	struct inode *inode = dentry->d_inode;
 	u8 *buffer = (u8 *) page_address(page) + offset;
-	int wsize = smb_get_wsize(SMB_SERVER(inode));
+	int wsize = smb_get_wsize(server_from_dentry(dentry));
 	int result, written = 0;
 
 	offset += page->offset;
@@ -142,7 +141,7 @@
 		if (count < wsize)
 			wsize = count;
 
-		result = smb_proc_write(inode, offset, wsize, buffer);
+		result = smb_proc_write(dentry, offset, wsize, buffer);
 		if (result < 0)
 			goto io_error;
 		/* N.B. what if result < wsize?? */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov