lkml.org 
[lkml]   [2020]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH] exfat: change exfat_set_vol_flags() return type void.
    From
    Date
    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>

    \
     
     \ /
      Last update: 2020-07-17 08:36    [W:2.787 / U:0.072 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site