• Jeff Layton's avatar
    cifs: fix handling of signing with writepages (try #6) · f3983c21
    Jeff Layton authored
    Get a reference to the file early so we can eventually base the decision
    about signing on the correct tcon. If that doesn't work for some reason,
    then fall back to generic_writepages. That's just as likely to fail, but
    it simplifies the error handling.
    
    In truth, I'm not sure how that could occur anyway, so maybe a NULL
    open_file here ought to be a BUG()?
    
    After that, we drop the reference to the open_file and then we re-get
    one prior to each WriteAndX call. This helps ensure that the filehandle
    isn't held open any longer than necessary and that open files are
    reclaimed prior to each write call.
    Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
    Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
    f3983c21
file.c 64.4 KB