diff options
author | Tetsuhiro Kohada <kohada.t2@gmail.com> | 2020-06-24 09:54:54 +0900 |
---|---|---|
committer | Namjae Jeon <namjae.jeon@samsung.com> | 2020-08-12 08:31:12 +0900 |
commit | 8b0c471773819c8201dc0b0123e1580639ee1570 (patch) | |
tree | 1f3affcd9013c0834efd43ca97d439c97afa800e /fs/exfat/file.c | |
parent | 3db3c3fb840ed4a6c7666d1464959edd40fe54f1 (diff) |
exfat: add error check when updating dir-entries
Add error check when synchronously updating dir-entries.
Suggested-by: Sungjong Seo <sj1557.seo@samsung.com>
Signed-off-by: Tetsuhiro Kohada <kohada.t2@gmail.com>
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Diffstat (limited to 'fs/exfat/file.c')
-rw-r--r-- | fs/exfat/file.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/exfat/file.c b/fs/exfat/file.c index a6a063830edc..6bdabfd4b134 100644 --- a/fs/exfat/file.c +++ b/fs/exfat/file.c @@ -154,6 +154,7 @@ int __exfat_truncate(struct inode *inode, loff_t new_size) struct timespec64 ts; struct exfat_dentry *ep, *ep2; struct exfat_entry_set_cache *es; + int err; es = exfat_get_dentry_set(sb, &(ei->dir), ei->entry, ES_ALL_ENTRIES); @@ -188,7 +189,9 @@ int __exfat_truncate(struct inode *inode, loff_t new_size) } exfat_update_dir_chksum_with_entry_set(es); - exfat_free_dentry_set(es, inode_needs_sync(inode)); + err = exfat_free_dentry_set(es, inode_needs_sync(inode)); + if (err) + return err; } /* cut off from the FAT chain */ |