diff options
author | Hugh Dickins <hugh@veritas.com> | 2008-07-29 02:50:18 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-08-01 12:43:11 -0700 |
commit | a3676137382ae2dbc6a469ead4cd37ccf970aede (patch) | |
tree | 92131e6476e5e4675e115755b7af3a9795745d6a /net/lapb/lapb_subr.c | |
parent | 9bbba9277a48a49ae9212558ee7656e6016bca4d (diff) |
tmpfs: fix kernel BUG in shmem_delete_inode
commit 14fcc23fdc78e9d32372553ccf21758a9bd56fa1 upstream
SuSE's insserve initscript ordering program hits kernel BUG at mm/shmem.c:814
on 2.6.26. It's using posix_fadvise on directories, and the shmem_readpage
method added in 2.6.23 is letting POSIX_FADV_WILLNEED allocate useless pages
to a tmpfs directory, incrementing i_blocks count but never decrementing it.
Fix this by assigning shmem_aops (pointing to readpage and writepage and
set_page_dirty) only when it's needed, on a regular file or a long symlink.
Many thanks to Kel for outstanding bugreport and steps to reproduce it.
Reported-by: Kel Modderman <kel@otaku42.de>
Tested-by: Kel Modderman <kel@otaku42.de>
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'net/lapb/lapb_subr.c')
0 files changed, 0 insertions, 0 deletions