Deleted Added
sdiff udiff text old ( 218863 ) new ( 218949 )
full compact
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 218863 2011-02-19 21:04:36Z alc $");
38
39#include <sys/param.h>
40#include <sys/fcntl.h>
41#include <sys/lockf.h>
42#include <sys/namei.h>
43#include <sys/priv.h>
44#include <sys/proc.h>
45#include <sys/sched.h>

--- 219 unchanged lines hidden (view full) ---

265
266/* --------------------------------------------------------------------- */
267
268static int
269tmpfs_close(struct vop_close_args *v)
270{
271 struct vnode *vp = v->a_vp;
272
273 struct tmpfs_node *node;
274
275 MPASS(VOP_ISLOCKED(vp));
276
277 node = VP_TO_TMPFS_NODE(vp);
278
279 if (node->tn_links > 0) {
280 /* Update node times. No need to do it if the node has
281 * been deleted, because it will vanish after we return. */
282 tmpfs_update(vp);
283 }
284
285 return 0;
286}
287
288/* --------------------------------------------------------------------- */
289
290int
291tmpfs_access(struct vop_access_args *v)
292{
293 struct vnode *vp = v->a_vp;

--- 553 unchanged lines hidden (view full) ---

847 if (v->a_cnp->cn_flags & DOWHITEOUT)
848 tmpfs_dir_whiteout_add(dvp, v->a_cnp);
849
850 /* Free the directory entry we just deleted. Note that the node
851 * referred by it will not be removed until the vnode is really
852 * reclaimed. */
853 tmpfs_free_dirent(tmp, de, TRUE);
854
855 if (node->tn_links > 0)
856 node->tn_status |= TMPFS_NODE_ACCESSED | TMPFS_NODE_CHANGED;
857 error = 0;
858
859out:
860
861 return error;
862}
863
864/* --------------------------------------------------------------------- */

--- 761 unchanged lines hidden ---