fs/exfat: unlock pages under readonly status
authorShiyong Li <a22381@motorola.com>
Sat, 9 Dec 2017 01:30:22 +0000 (17:30 -0800)
committerxiest1 <xiest1@lenovo.com>
Tue, 5 Nov 2019 09:30:25 +0000 (17:30 +0800)
commitf872984ac44b26399dd8282e43d2e5c177249221
treed6f60ae144622f74f1d33ca92c62ab5d644c89d9
parent6b655129d597f25b54f0a12040384211f5d00cc2
fs/exfat: unlock pages under readonly status

The ->writepage should unlock its page before returning the results.
Otherwise, evict_inode can be hanged while truncating pages.

- Backtrace -

(__schedule+0x3dc/0x908) from [<c0b67854>] (io_schedule+0x6c/0x94)
(io_schedule+0x6c/0x94) from [<c01ce2dc>] (sleep_on_page+0x8/0x10)
(sleep_on_page+0x8/0x10) from [<c0b64e70>] (__wait_on_bit_lock+0x6c/0xb8)
(__wait_on_bit_lock+0x6c/0xb8) from [<c01ce418>] (__lock_page+0x90/0x98)
(__lock_page+0x90/0x98) from [<c01dcae8>] (truncate_inode_pages_range+0x360/0x37c)
(truncate_inode_pages_range+0x360/0x37c) from [<c01dcb1c>] (truncate_inode_pages+0x18/0x20)
(truncate_inode_pages+0x18/0x20) from [<c0304618>] (exfat_evict_inode+0x18/0xb0)
(exfat_evict_inode+0x18/0xb0) from [<c0228590>] (evict+0x94/0x178)
(evict+0x94/0x178) from [<c02286a4>] (dispose_list+0x30/0x40)
(dispose_list+0x30/0x40) from [<c022924c>] (evict_inodes+0xc8/0xd0)
(evict_inodes+0xc8/0xd0) from [<c0212964>] (generic_shutdown_super+0x44/0xc4)
(generic_shutdown_super+0x44/0xc4) from [<c0212bd4>] (kill_block_super+0x18/0x68)
(kill_block_super+0x18/0x68) from [<c0212f3c>] (deactivate_locked_super+0x48/0x64)
(deactivate_locked_super+0x48/0x64) from [<c022d660>] (SyS_umount+0x90/0x390)

Change-Id: I0a9caebeceda503c72e365957b1bf97d74f3de89
Signed-off-by: Jaegeuk Kim <jaegeuk@motorola.com>
Signed-off-by: Shiyong Li <a22381@motorola.com>
Reviewed-on: https://gerrit.mot.com/1102178
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1276879
Reviewed-by: Hua Tan <tanhua1@motorola.com>
fs/exfat/exfat_super.c