linux/fs/ext4
Theodore Ts'o bdfe0cbd74 Revert "ext4: remove block_device_ejected"
This reverts commit 08439fec26.

Unfortunately we still need to test for bdi->dev to avoid a crash when a
USB stick is yanked out while a file system is mounted:

   usb 2-2: USB disconnect, device number 2
   Buffer I/O error on dev sdb1, logical block 15237120, lost sync page write
   JBD2: Error -5 detected when updating journal superblock for sdb1-8.
   BUG: unable to handle kernel paging request at 34beb000
   IP: [<c136ce88>] __percpu_counter_add+0x18/0xc0
   *pdpt = 0000000023db9001 *pde = 0000000000000000 
   Oops: 0000 [#1] SMP 
   CPU: 0 PID: 4083 Comm: umount Tainted: G     U     OE   4.1.1-040101-generic #201507011435
   Hardware name: LENOVO 7675CTO/7675CTO, BIOS 7NETC2WW (2.22 ) 03/22/2011
   task: ebf06b50 ti: ebebc000 task.ti: ebebc000
   EIP: 0060:[<c136ce88>] EFLAGS: 00010082 CPU: 0
   EIP is at __percpu_counter_add+0x18/0xc0
   EAX: f21c8e88 EBX: f21c8e88 ECX: 00000000 EDX: 00000001
   ESI: 00000001 EDI: 00000000 EBP: ebebde60 ESP: ebebde40
    DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
   CR0: 8005003b CR2: 34beb000 CR3: 33354200 CR4: 000007f0
   Stack:
    c1abe100 edcb0098 edcb00ec ffffffff f21c8e68 ffffffff f21c8e68 f286d160
    ebebde84 c1160454 00000010 00000282 f72a77f8 00000984 f72a77f8 f286d160
    f286d170 ebebdea0 c11e613f 00000000 00000282 f72a77f8 edd7f4d0 00000000
   Call Trace:
    [<c1160454>] account_page_dirtied+0x74/0x110
    [<c11e613f>] __set_page_dirty+0x3f/0xb0
    [<c11e6203>] mark_buffer_dirty+0x53/0xc0
    [<c124a0cb>] ext4_commit_super+0x17b/0x250
    [<c124ac71>] ext4_put_super+0xc1/0x320
    [<c11f04ba>] ? fsnotify_unmount_inodes+0x1aa/0x1c0
    [<c11cfeda>] ? evict_inodes+0xca/0xe0
    [<c11b925a>] generic_shutdown_super+0x6a/0xe0
    [<c10a1df0>] ? prepare_to_wait_event+0xd0/0xd0
    [<c1165a50>] ? unregister_shrinker+0x40/0x50
    [<c11b92f6>] kill_block_super+0x26/0x70
    [<c11b94f5>] deactivate_locked_super+0x45/0x80
    [<c11ba007>] deactivate_super+0x47/0x60
    [<c11d2b39>] cleanup_mnt+0x39/0x80
    [<c11d2bc0>] __cleanup_mnt+0x10/0x20
    [<c1080b51>] task_work_run+0x91/0xd0
    [<c1011e3c>] do_notify_resume+0x7c/0x90
    [<c1720da5>] work_notify
   Code: 8b 55 e8 e9 f4 fe ff ff 90 90 90 90 90 90 90 90 90 90 90 55 89 e5 83 ec 20 89 5d f4 89 c3 89 75 f8 89 d6 89 7d fc 89 cf 8b 48 14 <64> 8b 01 89 45 ec 89 c2 8b 45 08 c1 fa 1f 01 75 ec 89 55 f0 89
   EIP: [<c136ce88>] __percpu_counter_add+0x18/0xc0 SS:ESP 0068:ebebde40
   CR2: 0000000034beb000
   ---[ end trace dd564a7bea834ecd ]---

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=101011

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@vger.kernel.org
2015-08-16 10:03:57 -04:00
..
acl.c ext4: remove unused header files 2015-04-02 23:47:42 -04:00
acl.h ext2/3/4: use generic posix ACL infrastructure 2014-01-25 23:58:19 -05:00
balloc.c ext4: verify block bitmap even after fresh initialization 2015-06-08 11:18:52 -04:00
bitmap.c ext4: remove unused header files 2015-04-02 23:47:42 -04:00
block_validity.c ext4: remove unused header files 2015-04-02 23:47:42 -04:00
crypto_fname.c ext4 crypto: remove duplicate header file 2015-07-28 15:12:18 -04:00
crypto_key.c ext4 crypto: fix spelling typo in comment 2015-07-22 00:09:45 -04:00
crypto_policy.c ext4 crypto: use a jbd2 transaction when adding a crypto policy 2015-07-17 11:16:47 -04:00
crypto.c ext4 crypto: fix ext4_get_crypto_ctx()'s calling convention in ext4_decrypt_one 2015-06-08 11:54:56 -04:00
dir.c ext4 crypto: make sure the encryption info is initialized on opendir(2) 2015-05-31 13:34:57 -04:00
ext4_crypto.h ext4 crypto: allocate bounce pages using GFP_NOWAIT 2015-06-03 09:32:39 -04:00
ext4_extents.h ext4: teach ext4_ext_find_extent() to realloc path if necessary 2014-09-01 14:40:09 -04:00
ext4_jbd2.c ext4: fix NULL pointer dereference when journal restart fails 2015-05-14 18:55:18 -04:00
ext4_jbd2.h ext4: don't use MAXQUOTAS value 2014-09-11 11:15:15 -04:00
ext4.h ext4: replace ext4_io_submit->io_op with ->io_wbc 2015-07-21 23:50:24 -04:00
extents_status.c ext4: fix data corruption caused by unwritten and delayed extents 2015-05-02 21:36:55 -04:00
extents_status.h ext4: introduce aging to extent status tree 2014-11-25 11:55:24 -05:00
extents.c Bug fixes (all for stable kernels) for ext4: 2015-07-05 16:24:54 -07:00
file.c xfs: update for 4.2-rc1 2015-06-30 20:16:08 -07:00
fsync.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2015-04-26 17:22:07 -07:00
hash.c ext4: remove unused header files 2015-04-02 23:47:42 -04:00
ialloc.c ext4 crypto: encrypt tmpfile located in encryption protected directory 2015-05-31 13:35:02 -04:00
indirect.c ext4: don't retry file block mapping on bigalloc fs with non-extent file 2015-06-21 21:10:51 -04:00
inline.c ext4 crypto: optimize filename encryption 2015-05-18 13:14:47 -04:00
inode.c ext4: update c/mtime on truncate up 2015-07-28 15:08:41 -04:00
ioctl.c ioctl_compat: handle FITRIM 2015-07-09 11:42:21 -07:00
Kconfig ext4 crypto: require CONFIG_CRYPTO_CTR if ext4 encryption is enabled 2015-05-31 13:31:37 -04:00
Makefile ext4 crypto: filename encryption facilities 2015-04-12 00:56:17 -04:00
mballoc.c Bug fixes (all for stable kernels) for ext4: 2015-07-05 16:24:54 -07:00
mballoc.h ext4: remove unused ac_ex_scanned 2014-02-20 13:32:10 -05:00
migrate.c ext4: correctly migrate a file with a hole at the beginning 2015-07-04 00:03:44 -04:00
mmp.c ext4: silence a format string false positive 2015-08-15 11:38:13 -04:00
move_extent.c ext4: make online defrag error reporting consistent 2015-06-21 21:38:03 -04:00
namei.c A very large number of cleanups and bug fixes --- in particular for 2015-06-25 14:06:55 -07:00
page-io.c ext4: implement cgroup writeback support 2015-07-21 23:51:26 -04:00
readpage.c ext4 crypto: shrink size of the ext4_crypto_ctx structure 2015-05-31 13:31:34 -04:00
resize.c ext4: fix growing of tiny filesystems 2015-05-02 23:58:32 -04:00
super.c Revert "ext4: remove block_device_ejected" 2015-08-16 10:03:57 -04:00
symlink.c A very large number of cleanups and bug fixes --- in particular for 2015-06-25 14:06:55 -07:00
truncate.h ext4: move common truncate functions to header file 2011-06-27 19:16:04 -04:00
xattr_security.c VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00
xattr_trusted.c VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00
xattr_user.c VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00
xattr.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2015-04-26 17:22:07 -07:00
xattr.h ext4 crypto: add encryption xattr support 2015-04-11 07:47:00 -04:00