• Pavel Shilovsky's avatar
    CIFS: Fix mkdir/rmdir bug for the non-POSIX case · 6de2ce42
    Pavel Shilovsky authored
    Currently we do inc/drop_nlink for a parent directory for every
    mkdir/rmdir calls. That's wrong when Unix extensions are disabled
    because in this case a server doesn't follow the same semantic and
    returns the old value on the next QueryInfo request. As the result,
    we update our value with the server one and then decrement it on
    every rmdir call - go to negative nlink values.
    
    Fix this by removing inc/drop_nlink for the parent directory from
    mkdir/rmdir, setting it for a revalidation and ignoring NumberOfLinks
    for directories when Unix extensions are disabled.
    Signed-off-by: default avatarPavel Shilovsky <piastry@etersoft.ru>
    Reviewed-by: default avatarJeff Layton <jlayton@samba.org>
    Signed-off-by: default avatarSteve French <smfrench@gmail.com>
    6de2ce42
inode.c 59.6 KB