tmpfs_vnops.c (295574) | tmpfs_vnops.c (298806) |
---|---|
1/* $NetBSD: tmpfs_vnops.c,v 1.39 2007/07/23 15:41:01 jmmv Exp $ */ 2 3/*- 4 * Copyright (c) 2005, 2006 The NetBSD Foundation, Inc. 5 * All rights reserved. 6 * 7 * This code is derived from software contributed to The NetBSD Foundation 8 * by Julio M. Merino Vidal, developed as part of Google's Summer of Code --- 20 unchanged lines hidden (view full) --- 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 * POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33/* 34 * tmpfs vnode interface. 35 */ 36#include <sys/cdefs.h> | 1/* $NetBSD: tmpfs_vnops.c,v 1.39 2007/07/23 15:41:01 jmmv Exp $ */ 2 3/*- 4 * Copyright (c) 2005, 2006 The NetBSD Foundation, Inc. 5 * All rights reserved. 6 * 7 * This code is derived from software contributed to The NetBSD Foundation 8 * by Julio M. Merino Vidal, developed as part of Google's Summer of Code --- 20 unchanged lines hidden (view full) --- 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 * POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33/* 34 * tmpfs vnode interface. 35 */ 36#include <sys/cdefs.h> |
37__FBSDID("$FreeBSD: head/sys/fs/tmpfs/tmpfs_vnops.c 295574 2016-02-12 20:43:53Z markj $"); | 37__FBSDID("$FreeBSD: head/sys/fs/tmpfs/tmpfs_vnops.c 298806 2016-04-29 20:51:24Z pfg $"); |
38 39#include <sys/param.h> 40#include <sys/fcntl.h> 41#include <sys/lockf.h> 42#include <sys/lock.h> 43#include <sys/namei.h> 44#include <sys/priv.h> 45#include <sys/proc.h> --- 789 unchanged lines hidden (view full) --- 835 error = ENOENT; 836 goto out_locked; 837 } 838 MPASS(de->td_node == fnode); 839 840 /* If re-naming a directory to another preexisting directory 841 * ensure that the target directory is empty so that its 842 * removal causes no side effects. | 38 39#include <sys/param.h> 40#include <sys/fcntl.h> 41#include <sys/lockf.h> 42#include <sys/lock.h> 43#include <sys/namei.h> 44#include <sys/priv.h> 45#include <sys/proc.h> --- 789 unchanged lines hidden (view full) --- 835 error = ENOENT; 836 goto out_locked; 837 } 838 MPASS(de->td_node == fnode); 839 840 /* If re-naming a directory to another preexisting directory 841 * ensure that the target directory is empty so that its 842 * removal causes no side effects. |
843 * Kern_rename gurantees the destination to be a directory | 843 * Kern_rename guarantees the destination to be a directory |
844 * if the source is one. */ 845 if (tvp != NULL) { 846 MPASS(tnode != NULL); 847 848 if ((tnode->tn_flags & (NOUNLINK | IMMUTABLE | APPEND)) || 849 (tdnode->tn_flags & (APPEND | IMMUTABLE))) { 850 error = EPERM; 851 goto out_locked; --- 574 unchanged lines hidden --- | 844 * if the source is one. */ 845 if (tvp != NULL) { 846 MPASS(tnode != NULL); 847 848 if ((tnode->tn_flags & (NOUNLINK | IMMUTABLE | APPEND)) || 849 (tdnode->tn_flags & (APPEND | IMMUTABLE))) { 850 error = EPERM; 851 goto out_locked; --- 574 unchanged lines hidden --- |