patch-2.3.29 linux/fs/nfs/symlink.c
Next file: linux/fs/nfs/write.c
Previous file: linux/fs/nfs/read.c
Back to the patch index
Back to the overall index
- Lines: 42
- Date:
Sat Nov 20 10:09:05 1999
- Orig file:
v2.3.28/linux/fs/nfs/symlink.c
- Orig date:
Wed Oct 27 16:34:12 1999
diff -u --recursive --new-file v2.3.28/linux/fs/nfs/symlink.c linux/fs/nfs/symlink.c
@@ -80,6 +80,8 @@
goto repeat;
}
+ kmap(page);
+
/* We place the length at the beginning of the page,
* in host byte order, followed by the string. The
* XDR response verification will NULL terminate it.
@@ -91,6 +93,7 @@
goto error;
SetPageUptodate(page);
unlock_out:
+ kunmap(page);
UnlockPage(page);
out:
return page;
@@ -113,11 +116,12 @@
if (!Page_Uptodate(page))
goto readlink_read_error;
success:
- p = (u32 *) page_address(page);
+ p = (u32 *) kmap(page);
len = *p++;
if (len > buflen)
len = buflen;
copy_to_user(buffer, p, len);
+ kunmap(page);
page_cache_release(page);
return len;
@@ -148,8 +152,9 @@
if (!Page_Uptodate(page))
goto followlink_read_error;
success:
- p = (u32 *) page_address(page);
+ p = (u32 *) kmap(page);
result = lookup_dentry((char *) (p + 1), base, follow);
+ kunmap(page);
page_cache_release(page);
return result;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)