Messages in this thread | | | Subject | Re: [PATCH] exfat: change exfat_set_vol_flags() return type void. | From | Tetsuhiro Kohada <> | Date | Fri, 17 Jul 2020 15:35:22 +0900 |
| |
On 2020/07/15 22:50, youngjun wrote: > exfat_set_vol_flags() always return 0. > So, change function return type as void.
On the contrary, I think it should be fixed to return an appropriate error.
> @@ -114,7 +113,7 @@ int exfat_set_vol_flags(struct super_block *sb, unsigned short new_flag) > * if this volume has been mounted with read-only > */ > if (sb_rdonly(sb)) > - return 0; > + return;
Some other FileSystems return -EROFS. exfat-fs may also need to return it. (If so, the caller will also need to be modified)
> p_boot->vol_flags = cpu_to_le16(new_flag); > > @@ -128,7 +127,7 @@ int exfat_set_vol_flags(struct super_block *sb, unsigned short new_flag) > > if (sync) > sync_dirty_buffer(sbi->boot_bh); > - return 0; > + return;
Shouldn't the execution result be returned when sync_dirty_buffer() is executed?
BR --- Tetsuhiro Kohada <kohada.t2@gmail.com>
| |