linux-sg2042/fs/smbfs
jan Blunck ca572727db fs/: do not fallback to default_llseek() when readdir() uses BKL
Do not use the fallback default_llseek() if the readdir operation of the
filesystem still uses the big kernel lock.

Since llseek() modifies
file->f_pos of the directory directly it may need locking to not confuse
readdir which usually uses file->f_pos directly as well

Since the special characteristics of the BKL (unlocked on schedule) are
not necessary in this case, the inode mutex can be used for locking as
provided by generic_file_llseek().  This is only possible since all
filesystems, except reiserfs, either use a directory as a flat file or
with disk address offsets.  Reiserfs on the other hand uses a 32bit hash
off the filename as the offset so generic_file_llseek() can get used as
well since the hash is always smaller than sb->s_maxbytes (= (512 << 32) -
blocksize).

Signed-off-by: Jan Blunck <jblunck@suse.de>
Acked-by: Jan Kara <jack@suse.cz>
Acked-by: Anders Larsen <al@alarsen.net>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-05-27 09:12:56 -07:00
..
Kconfig fs/Kconfig: move smbfs out 2009-01-22 13:16:01 +03:00
Makefile FS: Remove dead code 2008-01-28 23:14:37 +01:00
cache.c remove unused #include <linux/dirent.h>'s 2008-07-25 10:53:34 -07:00
dir.c fs/: do not fallback to default_llseek() when readdir() uses BKL 2010-05-27 09:12:56 -07:00
file.c smbfs: Push down BKL into ioctl function 2010-05-17 05:27:04 +02:00
getopt.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
getopt.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
inode.c smbfs: add bdi backing to mount session 2010-04-22 12:37:07 +02:00
ioctl.c smbfs: Push down BKL into ioctl function 2010-05-17 05:27:04 +02:00
proc.c smbfs: read buffer overflow 2009-09-23 07:39:27 -07:00
proto.h smbfs: Push down BKL into ioctl function 2010-05-17 05:27:04 +02:00
request.c Remove commented-out code copied from NFS 2007-12-06 17:40:31 -05:00
request.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
smb_debug.h fs: replace remaining __FUNCTION__ occurrences 2008-04-30 08:29:54 -07:00
smbiod.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
sock.c smbfs: fix calculation of kernel_recvmsg size parameter in smb_receive() 2008-02-06 10:41:02 -08:00
symlink.c smbfs: remove duplicated #include 2010-05-25 08:07:07 -07:00