[Ocfs2-commits] mfasheh commits r1262 - trunk/src
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Wed Jul 14 20:07:55 CDT 2004
Author: mfasheh
Date: 2004-07-14 19:07:54 -0500 (Wed, 14 Jul 2004)
New Revision: 1262
Modified:
trunk/src/inode.c
trunk/src/namei.c
Log:
* use ocfs_get_system_file_inode instead of igrab to get the orphan
dir inode.
* take out an unneeded (and unlocked!) check in unlink -- we do it
again later, when it's more appropriate anyway.
Modified: trunk/src/inode.c
===================================================================
--- trunk/src/inode.c 2004-07-15 00:04:38 UTC (rev 1261)
+++ trunk/src/inode.c 2004-07-15 00:07:54 UTC (rev 1262)
@@ -622,7 +622,9 @@
goto clear_inode;
}
- orphan_dir_inode = igrab(osb->system_inodes[ORPHAN_DIR_SYSTEM_INODE]);
+ orphan_dir_inode = ocfs_get_system_file_inode(osb,
+ ORPHAN_DIR_SYSTEM_INODE,
+ -1);
if (!orphan_dir_inode) {
LOG_ERROR_STATUS(-EFAIL);
goto clear_inode;
Modified: trunk/src/namei.c
===================================================================
--- trunk/src/namei.c 2004-07-15 00:04:38 UTC (rev 1261)
+++ trunk/src/namei.c 2004-07-15 00:07:54 UTC (rev 1262)
@@ -706,11 +706,6 @@
status = -EBUSY;
- if (S_ISDIR (inode->i_mode) && !empty_dir(inode)) {
- LOG_TRACE_STR ("dentry is not empty, cannot delete");
- goto bail;
- }
-
if (inode == osb->root_inode) {
LOG_TRACE_STR ("Cannot delete the root directory");
status = -EPERM;
@@ -2016,7 +2011,9 @@
LOG_TRACE_ARGS("adding filename '%s' to orphan dir (len=%d)\n", name,
namelen);
- orphan_dir_inode = igrab(osb->system_inodes[ORPHAN_DIR_SYSTEM_INODE]);
+ orphan_dir_inode = ocfs_get_system_file_inode(osb,
+ ORPHAN_DIR_SYSTEM_INODE,
+ -1);
if (!orphan_dir_inode) {
status = -EFAIL;
LOG_ERROR_STATUS(status);
More information about the Ocfs2-commits
mailing list