[Oracleasm-commits] jlbec commits r286 - trunk/kernel
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Thu Feb 24 20:32:34 CST 2005
Author: jlbec
Date: 2005-02-24 20:32:32 -0600 (Thu, 24 Feb 2005)
New Revision: 286
Modified:
trunk/kernel/oracleasm.c
Log:
o Remove now unused unlink code
Modified: trunk/kernel/oracleasm.c
===================================================================
--- trunk/kernel/oracleasm.c 2005-02-25 01:39:18 UTC (rev 285)
+++ trunk/kernel/oracleasm.c 2005-02-25 02:32:32 UTC (rev 286)
@@ -577,59 +577,6 @@
return 0;
}
-
-static inline int asmfs_positive(struct dentry *dentry)
-{
- return dentry->d_inode && !d_unhashed(dentry);
-}
-
-/*
- * Check that a directory is empty (this works
- * for regular files too, they'll just always be
- * considered empty..).
- *
- * Note that an empty directory can still have
- * children, they just all have to be negative..
- */
-static int asmfs_empty(struct dentry *dentry)
-{
- struct list_head *list;
-
- spin_lock_irq(&dcache_lock);
- list = dentry->d_subdirs.next;
-
- while (list != &dentry->d_subdirs) {
- struct dentry *de = list_entry(list, struct dentry, d_child);
-
- if (asmfs_positive(de)) {
- spin_unlock_irq(&dcache_lock);
- return 0;
- }
- list = list->next;
- }
- spin_unlock_irq(&dcache_lock);
- return 1;
-}
-
-/*
- * This works for both directories and regular files.
- * (non-directories will always have empty subdirs)
- */
-static int asmfs_unlink(struct inode * dir, struct dentry *dentry)
-{
- int retval = -ENOTEMPTY;
-
- if (asmfs_empty(dentry)) {
- struct inode *inode = dentry->d_inode;
-
- inode->i_nlink--;
- dput(dentry); /* Undo the count from "create" - this does all the work */
-
- retval = 0;
- }
- return retval;
-}
-
static void asmfs_put_super(struct super_block *sb)
{
kfree(ASMFS_SB(sb));
More information about the Oracleasm-commits
mailing list