• Al Viro's avatar
    do_last(): don't bother with keeping got_write in FMODE_OPENED case · 59e96e65
    Al Viro authored
    it's easier to drop it right after lookup_open() and regain if
    needed (i.e. if we will need to truncate).  On the non-FMODE_OPENED
    path we do that anyway.  In case of FMODE_CREATED we won't be
    needing it.  And it's easier to prove correctness that way,
    especially since the initial failure to get write access is not
    always fatal; proving that we'll never end up truncating in that
    case is rather convoluted.
    Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
    59e96e65
namei.c 120 KB