patch-1.3.28 linux/fs/nfs/dir.c

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

diff -u --recursive --new-file v1.3.27/linux/fs/nfs/dir.c linux/fs/nfs/dir.c
@@ -92,7 +92,7 @@
 static int nfs_readdir(struct inode *inode, struct file *filp,
 		       void *dirent, filldir_t filldir)
 {
-	static int c_dev = 0;
+	static kdev_t c_dev = 0;
 	static int c_ino;
 	static int c_size;
 
@@ -215,7 +215,7 @@
  */
 
 static struct nfs_lookup_cache_entry {
-	int dev;
+	kdev_t dev;
 	int inode;
 	char filename[NFS_MAXNAMLEN + 1];
 	struct nfs_fh fhandle;
@@ -231,7 +231,8 @@
 
 	for (i = 0; i < NFS_LOOKUP_CACHE_SIZE; i++) {
 		entry = nfs_lookup_cache + i;
-		if (entry->dev == dir->i_dev && entry->inode == dir->i_ino
+		if (entry->dev == dir->i_dev
+		    && entry->inode == dir->i_ino
 		    && !strncmp(filename, entry->filename, NFS_MAXNAMLEN))
 			return entry;
 	}
@@ -291,7 +292,7 @@
 				    const char *filename)
 {
 	struct nfs_lookup_cache_entry *entry;
-	int dev;
+	kdev_t dev;
 	int fileid;
 	int i;
 
@@ -316,7 +317,7 @@
 				     struct nfs_fattr *fattr)
 {
 	struct nfs_lookup_cache_entry *entry;
-	int dev = file->i_dev;
+	kdev_t dev = file->i_dev;
 	int fileid = file->i_ino;
 	int i;
 
@@ -621,7 +622,7 @@
 	inode->i_size = fattr->size;
 	inode->i_blksize = fattr->blocksize;
 	if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode))
-		inode->i_rdev = fattr->rdev;
+		inode->i_rdev = to_kdev_t(fattr->rdev);
 	else
 		inode->i_rdev = 0;
 	inode->i_blocks = fattr->blocks;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this