• NeilBrown's avatar
    md/bitmap: don't abuse i_writecount for bitmap files. · 035328c2
    NeilBrown authored
    md bitmap code currently tries to use i_writecount to stop any other
    process from writing to out bitmap file.  But that is really an abuse
    and has bit-rotted so locking is all wrong.
    
    So discard that - root should be allowed to shoot self in foot.
    
    Still use it in a much less intrusive way to stop the same file being
    used as bitmap on two different array, and apply other checks to
    ensure the file is at least vaguely usable for bitmap storage
    (is regular, is open for write.  Support for ->bmap is already checked
    elsewhere).
    Reported-by: default avatarAl Viro <viro@ZenIV.linux.org.uk>
    Signed-off-by: default avatarNeilBrown <neilb@suse.de>
    035328c2
md.c 225 KB