patch-2.3.48 linux/fs/bfs/dir.c

Next file: linux/fs/bfs/file.c
Previous file: linux/fs/bad_inode.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.47/linux/fs/bfs/dir.c linux/fs/bfs/dir.c
@@ -23,11 +23,6 @@
 static struct buffer_head * bfs_find_entry(struct inode * dir, 
 	const char * name, int namelen, struct bfs_dirent ** res_dir);
 
-static ssize_t bfs_dir_read(struct file * f, char * buf, size_t count, loff_t *ppos)
-{
-	return -EISDIR;
-}
-
 static int bfs_readdir(struct file * f, void * dirent, filldir_t filldir)
 {
 	struct inode * dir = f->f_dentry->d_inode;
@@ -75,10 +70,10 @@
 	return 0;	
 }
 
-static struct file_operations bfs_dir_operations = {
-	read:			bfs_dir_read,
-	readdir:		bfs_readdir,
-	fsync:			file_fsync,
+struct file_operations bfs_dir_operations = {
+	read:		generic_read_dir,
+	readdir:	bfs_readdir,
+	fsync:		file_fsync,
 };
 
 extern void dump_imap(const char *, struct super_block *);
@@ -107,6 +102,7 @@
 	inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
 	inode->i_blocks = inode->i_blksize = 0;
 	inode->i_op = &bfs_file_inops;
+	inode->i_fop = &bfs_file_operations;
 	inode->i_mapping->a_ops = &bfs_aops;
 	inode->i_mode = mode;
 	inode->i_ino = inode->iu_dsk_ino = ino;
@@ -256,15 +252,10 @@
 }
 
 struct inode_operations bfs_dir_inops = {
-	default_file_ops:	&bfs_dir_operations,
 	create:			bfs_create,
 	lookup:			bfs_lookup,
 	link:			bfs_link,
 	unlink:			bfs_unlink,
-	symlink:		NULL,
-	mkdir:			NULL,
-	rmdir:			NULL,
-	mknod:			NULL,
 	rename:			bfs_rename,
 };
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)