提交 121cef8f 编写于 作者: A Andy Lutomirski 提交者: Linus Torvalds

ext4: in ext4_dir_llseek, check syscall bitness directly

ext4 treats directory offsets differently for 32-bit and 64-bit callers.
Check the caller type using in_compat_syscall, not is_compat_task.  This
changes behavior on SPARC slightly.
Signed-off-by: NAndy Lutomirski <luto@kernel.org>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: Andreas Dilger <adilger.kernel@dilger.ca>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 6d8bedff
......@@ -285,7 +285,7 @@ static int ext4_readdir(struct file *file, struct dir_context *ctx)
static inline int is_32bit_api(void)
{
#ifdef CONFIG_COMPAT
return is_compat_task();
return in_compat_syscall();
#else
return (BITS_PER_LONG == 32);
#endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册