[Ocfs2-commits] jlbec commits r2219 - trunk/fs/ocfs2

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Thu May 5 18:03:14 CDT 2005


Author: jlbec
Signed-off-by: mfasheh
Date: 2005-05-05 18:03:13 -0500 (Thu, 05 May 2005)
New Revision: 2219

Modified:
   trunk/fs/ocfs2/aops.c
   trunk/fs/ocfs2/namei.c
Log:

o Remove the cont_prepare_write() warning, doesn't apply in 2.6.
o Don't print an error when another node beats you to unlink().

Signed-off-by: mfasheh



Modified: trunk/fs/ocfs2/aops.c
===================================================================
--- trunk/fs/ocfs2/aops.c	2005-05-04 22:35:58 UTC (rev 2218)
+++ trunk/fs/ocfs2/aops.c	2005-05-05 23:03:13 UTC (rev 2219)
@@ -202,7 +202,6 @@
 	OCFS_I(inode)->ip_mmu_private += inode->i_sb->s_blocksize;
 
 bail:
-#warning Any error will crash kunmap_high() from cont_prepare_write()
 	if (err < 0)
 		err = -EIO;
 

Modified: trunk/fs/ocfs2/namei.c
===================================================================
--- trunk/fs/ocfs2/namei.c	2005-05-04 22:35:58 UTC (rev 2218)
+++ trunk/fs/ocfs2/namei.c	2005-05-05 23:03:13 UTC (rev 2219)
@@ -755,7 +755,6 @@
 {
 	int status;
 	struct inode *inode = dentry->d_inode;
-	int retval = -EBUSY;
 	ocfs_super *osb = OCFS_SB(dir->i_sb);
 	u64 blkno;
 	ocfs2_dinode *fe = NULL;
@@ -774,8 +773,6 @@
 
 	mlog(0, "ino = %"MLFu64"\n", OCFS_I(inode)->ip_blkno);
 
-	status = -EBUSY;
-
 	if (inode == osb->root_inode) {
 		mlog(0, "Cannot delete the root directory\n");
 		status = -EPERM;
@@ -800,7 +797,8 @@
 					 dir, 0, &dirent_bh,
 					 &dirent);
 	if (status < 0) {
-		mlog_errno(status);
+		if (status != -ENOENT)
+			mlog_errno(status);
 		goto leave;
 	}
 
@@ -815,7 +813,8 @@
 
 	status = ocfs2_request_unlink_vote(inode);
 	if (status < 0) {
-		/* This vote should succeed under all normal circumstances. */
+		/* This vote should succeed under all normal
+		 * circumstances. */
 		mlog_errno(status);
 		goto leave;
 	}
@@ -906,17 +905,6 @@
 	if (handle)
 		ocfs_commit_trans(handle);
 
-	if (status < 0
-	    && status != -ENOTEMPTY
-	    && status != -EPERM
-	    && status != -EBUSY
-	    && status != -EINTR
-	    && status != -ERESTARTSYS) {
-		mlog_errno(status);
-		retval = -EBUSY;
-	} else
-		retval = status;
-
 	if (fe_bh)
 		brelse(fe_bh);
 
@@ -932,9 +920,9 @@
 	if (orphan_name)
 		kfree(orphan_name);
 
-	mlog_exit (retval);
+	mlog_exit(status);
 
-	return retval;
+	return status;
 }				/* ocfs_unlink */
 
 /*



More information about the Ocfs2-commits mailing list