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

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

diff -u --recursive --new-file v2.3.47/linux/fs/smbfs/dir.c linux/fs/smbfs/dir.c
@@ -18,7 +18,6 @@
 /* #define pr_debug printk */
 #define SMBFS_MAX_AGE 5*HZ
 
-static ssize_t smb_dir_read(struct file *, char *, size_t, loff_t *);
 static int smb_readdir(struct file *, void *, filldir_t);
 static int smb_dir_open(struct inode *, struct file *);
 
@@ -30,9 +29,9 @@
 static int smb_rename(struct inode *, struct dentry *,
 		      struct inode *, struct dentry *);
 
-static struct file_operations smb_dir_operations =
+struct file_operations smb_dir_operations =
 {
-	read:		smb_dir_read,
+	read:		generic_read_dir,
 	readdir:	smb_readdir,
 	ioctl:		smb_ioctl,
 	open:		smb_dir_open,
@@ -40,28 +39,15 @@
 
 struct inode_operations smb_dir_inode_operations =
 {
-	&smb_dir_operations,	/* default directory file ops */
-	smb_create,		/* create */
-	smb_lookup,		/* lookup */
-	NULL,			/* link */
-	smb_unlink,		/* unlink */
-	NULL,			/* symlink */
-	smb_mkdir,		/* mkdir */
-	smb_rmdir,		/* rmdir */
-	NULL,			/* mknod */
-	smb_rename,		/* rename */
-	NULL,			/* readlink */
-	NULL,			/* follow_link */
-	NULL,			/* truncate */
-	NULL,			/* permission */
-	smb_revalidate_inode,	/* revalidate */
+	create:		smb_create,
+	lookup:		smb_lookup,
+	unlink:		smb_unlink,
+	mkdir:		smb_mkdir,
+	rmdir:		smb_rmdir,
+	rename:		smb_rename,
+	revalidate:	smb_revalidate_inode,
+	setattr:	smb_notify_change,
 };
-
-static ssize_t
-smb_dir_read(struct file *filp, char *buf, size_t count, loff_t *ppos)
-{
-	return -EISDIR;
-}
 
 static int 
 smb_readdir(struct file *filp, void *dirent, filldir_t filldir)

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