patch-2.2.14 linux/fs/nfsd/nfsproc.c
Next file: linux/fs/nfsd/nfssvc.c
Previous file: linux/fs/nfsd/nfsfh.c
Back to the patch index
Back to the overall index
- Lines: 20
- Date:
Tue Jan 4 10:12:23 2000
- Orig file:
v2.2.13/linux/fs/nfsd/nfsproc.c
- Orig date:
Tue Jan 4 11:10:40 2000
diff -u --recursive --new-file v2.2.13/linux/fs/nfsd/nfsproc.c linux/fs/nfsd/nfsproc.c
@@ -270,7 +270,7 @@
rdev = (dev_t) size;
if (type != S_IFBLK && type != S_IFCHR) {
rdev = 0;
- } else if (type == S_IFCHR && size == ~(u32) 0) {
+ } else if (type == S_IFCHR && !(attr->ia_valid & ATTR_SIZE)) {
/* If you think you've seen the worst, grok this. */
attr->ia_mode = S_IFIFO | mode;
type = S_IFIFO;
@@ -288,6 +288,10 @@
if (inode && (type != (inode->i_mode & S_IFMT) ||
(is_borc && inode->i_rdev != rdev)))
goto out_unlock;
+
+ /* invalidate size because only (type == S_IFREG) has
+ size. */
+ attr->ia_valid &= ~ATTR_SIZE;
}
nfserr = 0;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)