diff options
| author | Jerry Jelinek <jerry.jelinek@joyent.com> | 2016-03-24 12:41:50 +0000 |
|---|---|---|
| committer | Jerry Jelinek <jerry.jelinek@joyent.com> | 2016-03-24 12:41:50 +0000 |
| commit | 4bbe81f0977c3edf0a0b743f9041ea25c7119ca1 (patch) | |
| tree | 57d581e52c694c9b02cfa2014535fa44b138e548 /usr/src/uts/common/fs/tmpfs/tmp_vnops.c | |
| parent | abd1eeaaab35f319c5e5d60cc9db4c19d389ecb8 (diff) | |
| parent | 23db4d6f668fd45f22b6b1fb668988cdf671a67b (diff) | |
| download | illumos-joyent-4bbe81f0977c3edf0a0b743f9041ea25c7119ca1.tar.gz | |
[illumos-gate merge]
commit 23db4d6f668fd45f22b6b1fb668988cdf671a67b
6686 import missing ipf manual pages
commit 54207fd2e1e7ed01d0416da8cf296dbef920fbfc
4242 file rename event fires before the rename happens
commit 28614c54e31c80fa6afc3ca7035a9eaa79fbaa63
6769 bop_printf internal buffer is too small
commit 7be29260103110981d73ce525891934e1cdf4374
6687 icmp(7P) and icmp6(7P) should mention that you need PRIV_NET_ICMPACCESS
Conflicts:
usr/src/uts/common/sys/vnode.h
usr/src/uts/common/fs/zfs/zfs_vnops.c
usr/src/uts/common/fs/ufs/ufs_vnops.c
usr/src/uts/common/fs/udfs/udf_vnops.c
usr/src/uts/common/fs/tmpfs/tmp_vnops.c
usr/src/uts/common/fs/pcfs/pc_dir.c
usr/src/man/man7p/icmp6.7p
usr/src/man/man7p/icmp.7p
usr/src/man/man4/ippool.4
usr/src/man/man4/ipnat.4
usr/src/man/man4/ipmon.4
usr/src/man/man4/ipf.4
Diffstat (limited to 'usr/src/uts/common/fs/tmpfs/tmp_vnops.c')
| -rw-r--r-- | usr/src/uts/common/fs/tmpfs/tmp_vnops.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/usr/src/uts/common/fs/tmpfs/tmp_vnops.c b/usr/src/uts/common/fs/tmpfs/tmp_vnops.c index bab4623abe..254940a6a3 100644 --- a/usr/src/uts/common/fs/tmpfs/tmp_vnops.c +++ b/usr/src/uts/common/fs/tmpfs/tmp_vnops.c @@ -25,7 +25,7 @@ */ /* - * Copyright 2015, Joyent, Inc. + * Copyright (c) 2015, Joyent, Inc. All rights reserved. * Copyright 2015 Nexenta Systems, Inc. All rights reserved. */ @@ -1200,7 +1200,7 @@ tmp_rename( struct tmpnode *fromparent; struct tmpnode *toparent; struct tmpnode *fromtp = NULL; /* source tmpnode */ - struct tmpnode *totp = NULL; /* target tmpnode */ + struct tmpnode *totp; /* target tmpnode */ struct tmount *tm = (struct tmount *)VTOTM(odvp); int error; int samedir = 0; /* set if odvp == ndvp */ @@ -1259,14 +1259,18 @@ tmp_rename( goto done; } - if (tdirlookup(toparent, nnm, &totp, cred) == 0) + if (tdirlookup(toparent, nnm, &totp, cred) == 0) { vnevent_pre_rename_dest(TNTOV(totp), ndvp, nnm, ct); + tmpnode_rele(totp); + } /* Notify the target dir. if not the same as the source dir. */ if (ndvp != odvp) { vnevent_pre_rename_dest_dir(ndvp, TNTOV(fromtp), nnm, ct); } + vnevent_pre_rename_src(TNTOV(fromtp), odvp, onm, ct); + /* * Link source to new target */ @@ -1287,8 +1291,6 @@ tmp_rename( goto done; } - vnevent_pre_rename_src(TNTOV(fromtp), odvp, onm, ct); - /* * Unlink from source. */ @@ -1313,8 +1315,12 @@ tmp_rename( if (error == 0) { vnevent_rename_src(TNTOV(fromtp), odvp, onm, ct); - /* vnevent_rename_dest event emitted in tdirenter(). */ - vnevent_rename_dest_dir(ndvp, TNTOV(fromtp), nnm, ct); + /* + * vnevent_rename_dest is called in tdirenter(). + * Notify the target dir if not same as source dir. + */ + if (ndvp != odvp) + vnevent_rename_dest_dir(ndvp, TNTOV(fromtp), nnm, ct); } done: |
