From: Alan Cox Date: Wed, 21 Feb 2018 20:22:47 +0000 (+0000) Subject: unlink: will need to hold lock over unlinki X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=9384d8a74ab1c0b63832165da803032e3eee8b62;p=FUZIX.git unlink: will need to hold lock over unlinki --- diff --git a/Kernel/syscall_fs.c b/Kernel/syscall_fs.c index 94dae7a1..f88f5135 100644 --- a/Kernel/syscall_fs.c +++ b/Kernel/syscall_fs.c @@ -390,8 +390,9 @@ arg_t _unlink(void) udata.u_error = ENOENT; return (-1); } + i_lock(ino); r = unlinki(ino, pino, lastname); - i_deref(pino); + i_unlock_deref(pino); i_deref(ino); return r; }