Deleted Added
full compact
tmpfs_vnops.c (218863) tmpfs_vnops.c (218949)
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 218863 2011-02-19 21:04:36Z alc $");
37__FBSDID("$FreeBSD: head/sys/fs/tmpfs/tmpfs_vnops.c 218949 2011-02-22 14:47:10Z 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
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
273 MPASS(VOP_ISLOCKED(vp));
274
277 node = VP_TO_TMPFS_NODE(vp);
275 /* Update node times. */
276 tmpfs_update(vp);
278
277
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;
278 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
279}
280
281/* --------------------------------------------------------------------- */
282
283int
284tmpfs_access(struct vop_access_args *v)
285{
286 struct vnode *vp = v->a_vp;

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

840 if (v->a_cnp->cn_flags & DOWHITEOUT)
841 tmpfs_dir_whiteout_add(dvp, v->a_cnp);
842
843 /* Free the directory entry we just deleted. Note that the node
844 * referred by it will not be removed until the vnode is really
845 * reclaimed. */
846 tmpfs_free_dirent(tmp, de, TRUE);
847
855 if (node->tn_links > 0)
856 node->tn_status |= TMPFS_NODE_ACCESSED | TMPFS_NODE_CHANGED;
848 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 ---
849 error = 0;
850
851out:
852
853 return error;
854}
855
856/* --------------------------------------------------------------------- */

--- 761 unchanged lines hidden ---