NetBSD Problem Report #41236

From yamt@mwd.biglobe.ne.jp  Fri Apr 17 02:34:04 2009
Return-Path: <yamt@mwd.biglobe.ne.jp>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 573F963C1FA
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 17 Apr 2009 02:34:04 +0000 (UTC)
Message-Id: <20090417023035.55BA797EF8@kaeru.lan>
Date: Fri, 17 Apr 2009 11:30:35 +0900 (JST)
From: yamt@mwd.biglobe.ne.jp
Reply-To: yamt@mwd.biglobe.ne.jp
To: gnats-bugs@gnats.NetBSD.org
Subject: tmpfs_rename doesn't handle hardlinks correctly
X-Send-Pr-Version: 3.95

>Number:         41236
>Category:       kern
>Synopsis:       tmpfs_rename doesn't handle hardlinks correctly
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Apr 17 02:35:00 +0000 2009
>Closed-Date:    Tue Oct 06 00:27:03 +0000 2009
>Last-Modified:  Mon Dec 07 04:35:01 +0000 2009
>Originator:     YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
>Release:        NetBSD 5.99.10
>Organization:

>Environment:


System: NetBSD kaeru 5.99.10
Architecture: i386
Machine: i386
>Description:
	tmpfs_rename() doesn't handle hardlinks correctly.

	/* If source and target are the same file, there is nothing to do. */
	if (fvp == tvp) {
		error = 0;
		goto out;
	}

	actually, it should remove the "from" link in that case.

>How-To-Repeat:

	% ls
	% touch a
	% ln a b
	% mv a b
	% ls
	a  b
	% 

>Fix:

>Release-Note:

>Audit-Trail:
From: Mindaugas Rasiukevicius <rmind@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/41236 CVS commit: src/sys/fs/tmpfs
Date: Tue, 6 Oct 2009 00:17:24 +0000

 Module Name:	src
 Committed By:	rmind
 Date:		Tue Oct  6 00:17:24 UTC 2009

 Modified Files:
 	src/sys/fs/tmpfs: tmpfs_vnops.c

 Log Message:
 tmpfs_rename: handle hard-links correctly.  Fixes PR/41236.


 To generate a diff of this commit:
 cvs rdiff -u -r1.62 -r1.63 src/sys/fs/tmpfs/tmpfs_vnops.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: rmind@NetBSD.org
State-Changed-When: Tue, 06 Oct 2009 00:27:03 +0000
State-Changed-Why:
Fixed.


From: Soren Jacobsen <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/41236 CVS commit: [netbsd-5] src/sys/fs/tmpfs
Date: Mon, 7 Dec 2009 04:30:13 +0000

 Module Name:	src
 Committed By:	snj
 Date:		Mon Dec  7 04:30:13 UTC 2009

 Modified Files:
 	src/sys/fs/tmpfs [netbsd-5]: tmpfs_vnops.c

 Log Message:
 Pull up following revision(s) (requested by rmind in ticket #1072):
 	sys/fs/tmpfs/tmpfs_vnops.c: revision 1.63
 tmpfs_rename: handle hard-links correctly.  Fixes PR/41236.


 To generate a diff of this commit:
 cvs rdiff -u -r1.51.6.5 -r1.51.6.6 src/sys/fs/tmpfs/tmpfs_vnops.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.