From 46905cb9a9a95ffbc17a01b07ab5a895b175cc67 Mon Sep 17 00:00:00 2001 From: espie Date: Thu, 10 Oct 2013 11:00:28 +0000 Subject: A few fixes from Pedro Martelletto, adapted from https://github.com/bitrig/bitrig/commits/pedro_tmpfs_fixes 7efd381ac3: # mkdir -p x/y # mv x/y/. z (or mv x/y/.. z) (panic) 264ecd2c7b: # mknod x b 100 100 (can be any block/character device) # ls -lR / (panic) 7da08d22fd: # mkfifo x (or mknod x) # mv x y (panic) af0666c65a: # mount -t tmpfs -o -n16 tmpfs /mnt (create tmpfs with 16 inodes limit) # cd /mnt # touch x # for i in `jot 100 1 100`; do ln -s x $i; done (create 100 symlinks, = they "succeed" even though they failed) # ls -lart 7e9296a6f8: # mkdir x # touch x/y # chflags uappnd x (or sappnd) # rm x/y 936b9cf257: # mkdir -p x/y # rmdir x/y/.. (panic) de541406ef: # touch x # ln x y # stat -f %c x # sleep 10 # rm y # stat -f %c x okay guenther@, krw@ --- sys/tmpfs/tmpfs_specops.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys/tmpfs/tmpfs_specops.c') diff --git a/sys/tmpfs/tmpfs_specops.c b/sys/tmpfs/tmpfs_specops.c index cd298d5f3ed..e0165bcfc62 100644 --- a/sys/tmpfs/tmpfs_specops.c +++ b/sys/tmpfs/tmpfs_specops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tmpfs_specops.c,v 1.2 2013/06/03 10:37:02 espie Exp $ */ +/* $OpenBSD: tmpfs_specops.c,v 1.3 2013/10/10 11:00:28 espie Exp $ */ /* $NetBSD: tmpfs_specops.c,v 1.10 2011/05/24 20:17:49 rmind Exp $ */ /* @@ -88,6 +88,7 @@ struct vops tmpfs_specvops = { .vop_bmap = vop_generic_bmap, .vop_strategy = spec_strategy, .vop_print = tmpfs_print, + .vop_islocked = tmpfs_islocked, .vop_pathconf = spec_pathconf, .vop_advlock = spec_advlock, .vop_bwrite = vop_generic_bwrite, -- cgit v1.2.3-59-g8ed1b