Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Mar 2011 22:40:13 GMT
From:      dfilter@FreeBSD.ORG (dfilter service)
To:        freebsd-fs@FreeBSD.org
Subject:   Re: kern/152079: commit references a PR
Message-ID:  <201103252240.p2PMeDU9015823@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/152079; it has been noted by GNATS.

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/152079: commit references a PR
Date: Fri, 25 Mar 2011 22:31:42 +0000 (UTC)

 Author: kib
 Date: Fri Mar 25 22:31:28 2011
 New Revision: 220014
 URL: http://svn.freebsd.org/changeset/base/220014
 
 Log:
   Report EBUSY instead of EROFS for attempt of deleting or renaming the
   root directory of msdosfs mount. The VFS code would handle deletion
   case itself too, assuming VV_ROOT flag is not lost. The msdosfs_rename()
   should also note attempt to rename root via doscheckpath() or different
   mount point check leading to EXDEV. Nonetheless, keep the checks for now.
   
   The change is inspired by NetBSD change referenced in PR, but return
   EBUSY like kern_unlinkat() does.
   
   PR:	kern/152079
   MFC after:	1 week
 
 Modified:
   head/sys/fs/msdosfs/msdosfs_lookup.c
 
 Modified: head/sys/fs/msdosfs/msdosfs_lookup.c
 ==============================================================================
 --- head/sys/fs/msdosfs/msdosfs_lookup.c	Fri Mar 25 22:17:24 2011	(r220013)
 +++ head/sys/fs/msdosfs/msdosfs_lookup.c	Fri Mar 25 22:31:28 2011	(r220014)
 @@ -458,7 +458,7 @@ foundroot:
  		 * Don't allow deleting the root.
  		 */
  		if (blkoff == MSDOSFSROOT_OFS)
 -			return EROFS;				/* really? XXX */
 +			return (EBUSY);
  
  		/*
  		 * Write access to directory required to delete files.
 @@ -491,7 +491,7 @@ foundroot:
  	 */
  	if (nameiop == RENAME && (flags & ISLASTCN)) {
  		if (blkoff == MSDOSFSROOT_OFS)
 -			return EROFS;				/* really? XXX */
 +			return (EBUSY);
  
  		error = VOP_ACCESS(vdp, VWRITE, cnp->cn_cred, cnp->cn_thread);
  		if (error)
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201103252240.p2PMeDU9015823>