linux-sg2042/fs/ext3
Eric Sandeen e8b96eb503 vfs: allow custom EOF in generic_file_llseek code
For ext3/4 htree directories, using the vfs llseek function with
SEEK_END goes to i_size like for any other file, but in reality
we want the maximum possible hash value.  Recent changes
in ext4 have cut & pasted generic_file_llseek() back into fs/ext4/dir.c,
but replicating this core code seems like a bad idea, especially
since the copy has already diverged from the vfs.

This patch updates generic_file_llseek_size to accept
both a custom maximum offset, and a custom EOF position.  With this
in place, ext4_dir_llseek can pass in the appropriate maximum hash
position for both maxsize and eof, and get what it wants.

As far as I know, this does not fix any bugs - nfs in the kernel
doesn't use SEEK_END, and I don't know of any user who does.  But
some ext4 folks seem keen on doing the right thing here, and I can't
really argue.

(Patch also fixes up some comments slightly)

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-07-23 00:00:15 +04:00
..
Kconfig ext3: default to ordered mode 2010-07-23 12:50:55 +02:00
Makefile [PATCH] ext3: uninline large functions 2006-12-07 08:39:35 -08:00
acl.c ext3: move headers to fs/ext3/ 2012-03-31 16:03:16 -04:00
acl.h fs: take the ACL checks to common code 2011-07-25 14:30:23 -04:00
balloc.c userns: Convert ext3 to use kuid/kgid where appropriate 2012-05-15 14:59:27 -07:00
bitmap.c ext3: move headers to fs/ext3/ 2012-03-31 16:03:16 -04:00
dir.c vfs: allow custom EOF in generic_file_llseek code 2012-07-23 00:00:15 +04:00
ext3.h Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs 2012-05-25 08:14:59 -07:00
ext3_jbd.c ext3: move headers to fs/ext3/ 2012-03-31 16:03:16 -04:00
file.c ext3: move headers to fs/ext3/ 2012-03-31 16:03:16 -04:00
fsync.c ext3: move headers to fs/ext3/ 2012-03-31 16:03:16 -04:00
hash.c ext3: return 32/64-bit dir name hash according to usage type 2012-05-15 23:34:39 +02:00
ialloc.c ext3: remove max_debt in find_group_orlov() 2012-04-11 11:12:44 +02:00
inode.c avoid iput() from flusher thread 2012-05-28 09:54:45 -07:00
ioctl.c ext3: move headers to fs/ext3/ 2012-03-31 16:03:16 -04:00
namei.c don't pass nameidata to ->create() 2012-07-14 16:34:47 +04:00
namei.h [PATCH] ext3: sparse fixes 2005-10-30 17:37:25 -08:00
resize.c ext3: move headers to fs/ext3/ 2012-03-31 16:03:16 -04:00
super.c quota: Move quota syncing to ->sync_fs method 2012-07-22 23:58:34 +04:00
symlink.c ext3: move headers to fs/ext3/ 2012-03-31 16:03:16 -04:00
xattr.c ext3: move headers to fs/ext3/ 2012-03-31 16:03:16 -04:00
xattr.h fs/vfs/security: pass last path component to LSM on inode creation 2011-02-01 11:12:29 -05:00
xattr_security.c ext3: move headers to fs/ext3/ 2012-03-31 16:03:16 -04:00
xattr_trusted.c ext3: move headers to fs/ext3/ 2012-03-31 16:03:16 -04:00
xattr_user.c ext3: move headers to fs/ext3/ 2012-03-31 16:03:16 -04:00