patch-2.1.55 linux/fs/ext2/dir.c

Next file: linux/fs/ext2/ialloc.c
Previous file: linux/fs/dquot.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.54/linux/fs/ext2/dir.c linux/fs/ext2/dir.c
@@ -32,7 +32,7 @@
 	return -EISDIR;
 }
 
-static int ext2_readdir (struct inode *, struct file *, void *, filldir_t);
+static int ext2_readdir(struct file *, void *, filldir_t);
 
 static struct file_operations ext2_dir_operations = {
 	NULL,			/* lseek - default */
@@ -101,7 +101,7 @@
 	return error_msg == NULL ? 1 : 0;
 }
 
-static int ext2_readdir (struct inode * inode, struct file * filp,
+static int ext2_readdir(struct file * filp,
 			 void * dirent, filldir_t filldir)
 {
 	int error = 0;
@@ -111,6 +111,7 @@
 	struct ext2_dir_entry * de;
 	struct super_block * sb;
 	int err;
+	struct inode *inode = filp->f_dentry->d_inode;
 
 	if (!inode || !S_ISDIR(inode->i_mode))
 		return -EBADF;

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