patch-2.1.45 linux/fs/nfs/inode.c

Next file: linux/fs/nfs/nfsroot.c
Previous file: linux/fs/nfs/file.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.44/linux/fs/nfs/inode.c linux/fs/nfs/inode.c
@@ -36,15 +36,17 @@
 
 static int nfs_notify_change(struct inode *, struct iattr *);
 static void nfs_put_inode(struct inode *);
+static void nfs_delete_inode(struct inode *);
 static void nfs_put_super(struct super_block *);
 static void nfs_read_inode(struct inode *);
-static void nfs_statfs(struct super_block *, struct statfs *, int bufsiz);
+static int nfs_statfs(struct super_block *, struct statfs *, int bufsiz);
 
 static struct super_operations nfs_sops = { 
 	nfs_read_inode,		/* read inode */
-	nfs_notify_change,	/* notify change */
 	NULL,			/* write inode */
 	nfs_put_inode,		/* put inode */
+	nfs_delete_inode,	/* delete inode */
+	nfs_notify_change,	/* notify change */
 	nfs_put_super,		/* put superblock */
 	NULL,			/* write superblock */
 	nfs_statfs,		/* stat filesystem */
@@ -73,9 +75,16 @@
 nfs_put_inode(struct inode * inode)
 {
 	dprintk("NFS: put_inode(%x/%ld)\n", inode->i_dev, inode->i_ino);
+}
 
-	if (inode->i_pipe)
-		clear_inode(inode);
+/*
+ * This should do any silly-rename cleanups once we
+ * get silly-renaming working again..
+ */
+static void
+nfs_delete_inode(struct inode * inode)
+{
+	dprintk("NFS: delete_inode(%x/%ld)\n", inode->i_dev, inode->i_ino);
 }
 
 void
@@ -249,7 +258,7 @@
 	return NULL;
 }
 
-static void
+static int
 nfs_statfs(struct super_block *sb, struct statfs *buf, int bufsiz)
 {
 	int error;
@@ -270,7 +279,7 @@
 	tmp.f_files = 0;
 	tmp.f_ffree = 0;
 	tmp.f_namelen = NAME_MAX;
-	copy_to_user(buf, &tmp, bufsiz);
+	return copy_to_user(buf, &tmp, bufsiz) ? -EFAULT : 0;
 }
 
 /*
@@ -316,7 +325,7 @@
 	}
 	dprintk("NFS: fhget(%x/%ld ct=%d)\n",
 		inode->i_dev, inode->i_ino,
-		atomic_read(&inode->i_count));
+		inode->i_count);
 
 	return inode;
 }
@@ -363,7 +372,6 @@
 		nfs_truncate_dirty_pages(inode, sattr.size);
 		nfs_refresh_inode(inode, &fattr);
 	}
-	inode->i_dirt = 0;
 	return error;
 }
 

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