rename: perform user mode dir loop check when not done in kernel
authorBill Zissimooulos <billziss@navimatics.com>
Sun, 13 May 2018 01:51:44 +0000 (18:51 -0700)
committerNikolaus Rath <Nikolaus@rath.org>
Fri, 18 May 2018 11:52:10 +0000 (12:52 +0100)
commitd105fafabbd01d39dd98d4e7d24e41da5cb2680e
treedfd561c3891d3a90856d6a7ec360ea922fe545f1
parent88da32d665eb3372f590675a5642c52f11c3ca03
rename: perform user mode dir loop check when not done in kernel

    Linux performs the dir loop check (rename(a, a/b/c)
    or rename(a/b/c, a), etc.) in kernel. Unfortunately
    other systems do not perform this check (e.g. FreeBSD).
    This results in a deadlock in get_path2, because libfuse
    did not expect to handle such cases.

    We add a check_dir_loop function that performs the dir
    loop check in user mode and enable it on systems that
    need it.
lib/fuse.c
test/test_syscalls.c