-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ANDROID: vfs/ext4,f2fs: finish umount(2) in time with filesystem work
This patch changes umount(2) flow to wait for delayed fput/mntput. Meanwhile, we can still see unclosed name spaces which can trigger filesystem panic due to released device illustrated below. (i.e., ext4 with errors=panic) So, it introduces fs->umount_end() to change filesystem behavior like error=remount-ro in ext4. WARN: DO NOT upstream! This is only related to Android reboot procedure, and resolves the below issue where a kernel panic happens when a living filesystem tries to access dead block device after device_shutdown done by kernel_restart. Term: namespace(mnt_get_count()) 1. create_new_namespaces() creates ns1 and ns2, /data(1) ns1(1) ns2(1) | | | --------------------- | sb->s_active = 3 2. after binder_proc_clear_zombies() for ns2 and ns1 triggers - delayed_fput() - delayed_mntput_work(ns2) /data(1) ns1(1) | | ---------- | sb->s_active = 2 3. umount() for /data is successed. ns1(1) | sb->s_active = 1 4. device_shutdown() by init 5. - delayed_mntput_work(ns1) - put_super(), since sb->s_active = 0 - -EIO Bug: 63981945 Bug: 65481582 Bug: 72236603 Change-Id: I7db02f480cc839bf9c245e078164a8168ea0d88b Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> Signed-off-by: Dhruv <dhruvgera61@gmail.com> Signed-off-by: negrroo <mohammedaelnaggar1@gmail.com>
- Loading branch information
Showing
6 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters