Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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: Christoph Hellwig <hch@lst.de>

authored by

Christoph Hellwig and committed by
Al Viro
3222a3e5 4e9ed2f8

+12 -1
+1
fs/afs/dir.c
··· 45 45 .release = afs_release, 46 46 .readdir = afs_readdir, 47 47 .lock = afs_lock, 48 + .llseek = generic_file_llseek, 48 49 }; 49 50 50 51 const struct inode_operations afs_dir_inode_operations = {
+1
fs/bfs/dir.c
··· 80 80 .read = generic_read_dir, 81 81 .readdir = bfs_readdir, 82 82 .fsync = file_fsync, 83 + .llseek = generic_file_llseek, 83 84 }; 84 85 85 86 extern void dump_imap(const char *, struct super_block *);
+1
fs/cifs/cifsfs.c
··· 765 765 .dir_notify = cifs_dir_notify, 766 766 #endif /* CONFIG_CIFS_EXPERIMENTAL */ 767 767 .unlocked_ioctl = cifs_ioctl, 768 + .llseek = generic_file_llseek, 768 769 }; 769 770 770 771 static void
+1
fs/fat/dir.c
··· 839 839 .compat_ioctl = fat_compat_dir_ioctl, 840 840 #endif 841 841 .fsync = file_fsync, 842 + .llseek = generic_file_llseek, 842 843 }; 843 844 844 845 static int fat_get_short_entry(struct inode *dir, loff_t *pos,
+2 -1
fs/jffs2/dir.c
··· 39 39 .read = generic_read_dir, 40 40 .readdir = jffs2_readdir, 41 41 .unlocked_ioctl=jffs2_ioctl, 42 - .fsync = jffs2_fsync 42 + .fsync = jffs2_fsync, 43 + .llseek = generic_file_llseek, 43 44 }; 44 45 45 46
+1
fs/jfs/namei.c
··· 1547 1547 #ifdef CONFIG_COMPAT 1548 1548 .compat_ioctl = jfs_compat_ioctl, 1549 1549 #endif 1550 + .llseek = generic_file_llseek, 1550 1551 }; 1551 1552 1552 1553 static int jfs_ci_hash(struct dentry *dir, struct qstr *this)
+1
fs/omfs/dir.c
··· 501 501 struct file_operations omfs_dir_operations = { 502 502 .read = generic_read_dir, 503 503 .readdir = omfs_readdir, 504 + .llseek = generic_file_llseek, 504 505 };
+1
fs/openpromfs/inode.c
··· 167 167 static const struct file_operations openprom_operations = { 168 168 .read = generic_read_dir, 169 169 .readdir = openpromfs_readdir, 170 + .llseek = generic_file_llseek, 170 171 }; 171 172 172 173 static struct dentry *openpromfs_lookup(struct inode *, struct dentry *, struct nameidata *);
+1
fs/proc/proc_sysctl.c
··· 353 353 354 354 static const struct file_operations proc_sys_dir_file_operations = { 355 355 .readdir = proc_sys_readdir, 356 + .llseek = generic_file_llseek, 356 357 }; 357 358 358 359 static const struct inode_operations proc_sys_inode_operations = {
+1
fs/sysfs/dir.c
··· 983 983 const struct file_operations sysfs_dir_operations = { 984 984 .read = generic_read_dir, 985 985 .readdir = sysfs_readdir, 986 + .llseek = generic_file_llseek, 986 987 };
+1
fs/ufs/dir.c
··· 667 667 .read = generic_read_dir, 668 668 .readdir = ufs_readdir, 669 669 .fsync = file_fsync, 670 + .llseek = generic_file_llseek, 670 671 };