diff options
author | gleb <gleb@FreeBSD.org> | 2012-03-14 09:15:50 +0000 |
---|---|---|
committer | gleb <gleb@FreeBSD.org> | 2012-03-14 09:15:50 +0000 |
commit | cc93f6fa4eb255e07f72e151c840b97c23fe6a68 (patch) | |
tree | 19d0929ea57025df331d35363e28846e59e48723 /sys/fs/tmpfs/tmpfs_subr.c | |
parent | fa1fc18612faf6bfd16e8092c070fc70e359b18b (diff) | |
download | FreeBSD-src-cc93f6fa4eb255e07f72e151c840b97c23fe6a68.zip FreeBSD-src-cc93f6fa4eb255e07f72e151c840b97c23fe6a68.tar.gz |
Prevent tmpfs_rename() deadlock in a way similar to UFS
Unlock vnodes and try to lock them one by one. Relookup fvp and tvp.
Approved by: mdf (mentor)
Diffstat (limited to 'sys/fs/tmpfs/tmpfs_subr.c')
-rw-r--r-- | sys/fs/tmpfs/tmpfs_subr.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c index 0d7c878..fe596aa 100644 --- a/sys/fs/tmpfs/tmpfs_subr.c +++ b/sys/fs/tmpfs/tmpfs_subr.c @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include <sys/proc.h> #include <sys/stat.h> #include <sys/systm.h> +#include <sys/sysctl.h> #include <sys/vnode.h> #include <sys/vmmeter.h> @@ -56,6 +57,8 @@ __FBSDID("$FreeBSD$"); #include <fs/tmpfs/tmpfs_fifoops.h> #include <fs/tmpfs/tmpfs_vnops.h> +SYSCTL_NODE(_vfs, OID_AUTO, tmpfs, CTLFLAG_RW, 0, "tmpfs file system"); + /* --------------------------------------------------------------------- */ /* |