fs/exfat: support readonly uevent
authorShiyong Li <a22381@motorola.com>
Sat, 9 Dec 2017 01:35:11 +0000 (17:35 -0800)
committerxiest1 <xiest1@lenovo.com>
Tue, 5 Nov 2019 09:30:25 +0000 (17:30 +0800)
Change-Id: Iba732aa27cce07133bdbc085bee10182f5796298
Signed-off-by: Lianwei Wang <a22439@motorola.com>
Signed-off-by: Shiyong Li <a22381@motorola.com>
Reviewed-on: https://gerrit.mot.com/1102181
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/1276882
Reviewed-by: Hua Tan <tanhua1@motorola.com>
fs/exfat/exfat_core.c

index 6254d03e430de7dd12c16520424ff78d5254df64..71c75e1c93671e6531c19eb51e16c7aae4650ecb 100644 (file)
@@ -1759,6 +1759,7 @@ void fs_error(struct super_block *sb)
                panic("[EXFAT] Filesystem panic from previous error\n");
        else if ((opts->errors == EXFAT_ERRORS_RO) && !(sb->s_flags & MS_RDONLY)) {
                sb->s_flags |= MS_RDONLY;
+               kobject_uevent(&disk_to_dev(sb->s_bdev->bd_disk)->kobj, KOBJ_CHANGE);
                printk(KERN_ERR "[EXFAT] Filesystem has been set read-only\n");
        }
 }