Commit 3222a3e5 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Al Viro

[PATCH] fix ->llseek for more directories

With this patch all directory fops instances that have a readdir
that doesn't take the BKL are switched to generic_file_llseek.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 4e9ed2f8
...@@ -45,6 +45,7 @@ const struct file_operations afs_dir_file_operations = { ...@@ -45,6 +45,7 @@ const struct file_operations afs_dir_file_operations = {
.release = afs_release, .release = afs_release,
.readdir = afs_readdir, .readdir = afs_readdir,
.lock = afs_lock, .lock = afs_lock,
.llseek = generic_file_llseek,
}; };
const struct inode_operations afs_dir_inode_operations = { const struct inode_operations afs_dir_inode_operations = {
......
...@@ -80,6 +80,7 @@ const struct file_operations bfs_dir_operations = { ...@@ -80,6 +80,7 @@ const struct file_operations bfs_dir_operations = {
.read = generic_read_dir, .read = generic_read_dir,
.readdir = bfs_readdir, .readdir = bfs_readdir,
.fsync = file_fsync, .fsync = file_fsync,
.llseek = generic_file_llseek,
}; };
extern void dump_imap(const char *, struct super_block *); extern void dump_imap(const char *, struct super_block *);
......
...@@ -765,6 +765,7 @@ const struct file_operations cifs_dir_ops = { ...@@ -765,6 +765,7 @@ const struct file_operations cifs_dir_ops = {
.dir_notify = cifs_dir_notify, .dir_notify = cifs_dir_notify,
#endif /* CONFIG_CIFS_EXPERIMENTAL */ #endif /* CONFIG_CIFS_EXPERIMENTAL */
.unlocked_ioctl = cifs_ioctl, .unlocked_ioctl = cifs_ioctl,
.llseek = generic_file_llseek,
}; };
static void static void
......
...@@ -839,6 +839,7 @@ const struct file_operations fat_dir_operations = { ...@@ -839,6 +839,7 @@ const struct file_operations fat_dir_operations = {
.compat_ioctl = fat_compat_dir_ioctl, .compat_ioctl = fat_compat_dir_ioctl,
#endif #endif
.fsync = file_fsync, .fsync = file_fsync,
.llseek = generic_file_llseek,
}; };
static int fat_get_short_entry(struct inode *dir, loff_t *pos, static int fat_get_short_entry(struct inode *dir, loff_t *pos,
......
...@@ -39,7 +39,8 @@ const struct file_operations jffs2_dir_operations = ...@@ -39,7 +39,8 @@ const struct file_operations jffs2_dir_operations =
.read = generic_read_dir, .read = generic_read_dir,
.readdir = jffs2_readdir, .readdir = jffs2_readdir,
.unlocked_ioctl=jffs2_ioctl, .unlocked_ioctl=jffs2_ioctl,
.fsync = jffs2_fsync .fsync = jffs2_fsync,
.llseek = generic_file_llseek,
}; };
......
...@@ -1547,6 +1547,7 @@ const struct file_operations jfs_dir_operations = { ...@@ -1547,6 +1547,7 @@ const struct file_operations jfs_dir_operations = {
#ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT
.compat_ioctl = jfs_compat_ioctl, .compat_ioctl = jfs_compat_ioctl,
#endif #endif
.llseek = generic_file_llseek,
}; };
static int jfs_ci_hash(struct dentry *dir, struct qstr *this) static int jfs_ci_hash(struct dentry *dir, struct qstr *this)
......
...@@ -501,4 +501,5 @@ struct inode_operations omfs_dir_inops = { ...@@ -501,4 +501,5 @@ struct inode_operations omfs_dir_inops = {
struct file_operations omfs_dir_operations = { struct file_operations omfs_dir_operations = {
.read = generic_read_dir, .read = generic_read_dir,
.readdir = omfs_readdir, .readdir = omfs_readdir,
.llseek = generic_file_llseek,
}; };
...@@ -167,6 +167,7 @@ static int openpromfs_readdir(struct file *, void *, filldir_t); ...@@ -167,6 +167,7 @@ static int openpromfs_readdir(struct file *, void *, filldir_t);
static const struct file_operations openprom_operations = { static const struct file_operations openprom_operations = {
.read = generic_read_dir, .read = generic_read_dir,
.readdir = openpromfs_readdir, .readdir = openpromfs_readdir,
.llseek = generic_file_llseek,
}; };
static struct dentry *openpromfs_lookup(struct inode *, struct dentry *, struct nameidata *); static struct dentry *openpromfs_lookup(struct inode *, struct dentry *, struct nameidata *);
......
...@@ -353,6 +353,7 @@ static const struct file_operations proc_sys_file_operations = { ...@@ -353,6 +353,7 @@ static const struct file_operations proc_sys_file_operations = {
static const struct file_operations proc_sys_dir_file_operations = { static const struct file_operations proc_sys_dir_file_operations = {
.readdir = proc_sys_readdir, .readdir = proc_sys_readdir,
.llseek = generic_file_llseek,
}; };
static const struct inode_operations proc_sys_inode_operations = { static const struct inode_operations proc_sys_inode_operations = {
......
...@@ -983,4 +983,5 @@ static int sysfs_readdir(struct file * filp, void * dirent, filldir_t filldir) ...@@ -983,4 +983,5 @@ static int sysfs_readdir(struct file * filp, void * dirent, filldir_t filldir)
const struct file_operations sysfs_dir_operations = { const struct file_operations sysfs_dir_operations = {
.read = generic_read_dir, .read = generic_read_dir,
.readdir = sysfs_readdir, .readdir = sysfs_readdir,
.llseek = generic_file_llseek,
}; };
...@@ -667,4 +667,5 @@ const struct file_operations ufs_dir_operations = { ...@@ -667,4 +667,5 @@ const struct file_operations ufs_dir_operations = {
.read = generic_read_dir, .read = generic_read_dir,
.readdir = ufs_readdir, .readdir = ufs_readdir,
.fsync = file_fsync, .fsync = file_fsync,
.llseek = generic_file_llseek,
}; };
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment