Skip to content
  • Paolo 'Blaisorblade' Giarrusso's avatar
    [PATCH] uml: remove empty hostfs_truncate method · daa35edc
    Paolo 'Blaisorblade' Giarrusso authored
    
    
    Calling truncate() on hostfs spits a kernel warning "Something isn't
    implemented here", but it still works fine.
    
    Indeed, hostfs i_op->truncate doesn't do anything.  But hostfs_setattr() ->
    set_attr() correctly detects ATTR_SIZE and calls truncate() on the host.  So
    we should be safe (using ftruncate() may be better, in case the file is
    unlinked on the host, but we aren't sure to have the file open for writing,
    and reopening it would cause the same races; plus nobody should expect UML to
    be so careful).
    
    So, the warning is wrong, because the current implementation is working.  Al,
    am I correct, and can the warning be therefore dropped?
    
    CC: Al Viro <viro@zeniv.linux.org.uk>
    Signed-off-by: default avatarPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    daa35edc