Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

PR 48958 - kevent(2): EVFILT_VNODE filter miscounting hardlinks



Christos,

I noticed that you committed the new atf tests suggested in this PR, but there doesn't seem to be any comment or action on the suggested fix for the underlying problem. The proposed fix was buried in the rest of the PR, so I've extracted it and copied it below.



 Content-Type: text/x-patch;
  name="ufs_vnops.c.diff"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename="ufs_vnops.c.diff"

--- sys/ufs/ufs/ufs_vnops.c.orig 2014-07-03 09:48:25.000000000 +0200
 +++ sys/ufs/ufs/ufs_vnops.c	2014-07-03 09:48:09.000000000 +0200
 @@ -1592,7 +1592,6 @@
  		doingdirectory = 1;
  	}
  	oldparent = fdp->i_number;
 -	VN_KNOTE(fdvp, NOTE_WRITE);		/* XXXLUKEM/XXX: right place? */

  	/*
  	 * Both the directory
 @@ -1696,7 +1695,13 @@
  			}
  			goto bad;
  		}
 -		VN_KNOTE(tdvp, NOTE_WRITE);
 +        	if (doingdirectory && newparent) {
 +                	VN_KNOTE(fdvp, NOTE_WRITE | NOTE_LINK);
 +                	VN_KNOTE(tdvp, NOTE_WRITE | NOTE_LINK);
 +                } else {
 +                	VN_KNOTE(fdvp, NOTE_WRITE);
 +        		VN_KNOTE(tdvp, NOTE_WRITE);
 +                }
  	} else {
  		if (txp->i_dev != tdp->i_dev || txp->i_dev != ip->i_dev)
  			panic("rename: EXDEV");




+------------------+--------------------------+------------------------+
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:      |
| (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com   |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org |
+------------------+--------------------------+------------------------+


Home | Main Index | Thread Index | Old Index