• Matthew Wilcox (Oracle)'s avatar
    ntfs3: Remove fsdata parameter from ntfs_extend_initialized_size() · 652118b8
    Matthew Wilcox (Oracle) authored
    After the last patch, Smatch reports:
    
            fs/ntfs3/file.c:168 ntfs_extend_initialized_size()
            error: uninitialized symbol 'fsdata'.
    
    fsdata is indeed unused.  This is not new, but Smatch couldn't see it
    before because calls through pagecache_write_begin()/pagecache_write_end()
    could theoretically call any implemention of ->write_begin/write_end,
    some of which do use fsdata.  Now that the calls are direct, Smatch can
    see they're never used.
    
    Fix this by simply passing NULL.  While ntfs3 does pass this parameter
    on to generic functions, those generic functions also never dereference
    the fsdata parameter, so it's unnecessary to pass the address of a real
    pointer.
    Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
    Signed-off-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
    652118b8
file.c 27.5 KB