#define DEBUG_SUBSYSTEM S_MDS
-#ifdef HAVE_KERNEL_CONFIG_H
+#ifndef AUTOCONF_INCLUDED
#include <linux/config.h>
#endif
#include <linux/module.h>
if (IS_ERR(file))
GOTO(err_pop, rc = PTR_ERR(file));
- INIT_LIST_HEAD(&dentry_list);
+ CFS_INIT_LIST_HEAD(&dentry_list);
rc = l_readdir(file, &dentry_list);
filp_close(file, 0);
if (rc < 0)
MDS_UP_READ_ORPHAN_SEM(child_inode);
rc = mds_unlink_orphan(obd, dchild, child_inode, pending_dir);
- if (rc == 0) {
- item ++;
- CDEBUG(D_HA, "%s: removed orphan %s\n",
- obd->obd_name, d_name);
- } else {
- CDEBUG(D_INODE, "%s: removed orphan %s failed,"
- " rc = %d\n", obd->obd_name, d_name, rc);
+ CDEBUG(D_INODE, "%s: removed orphan %s: rc %d\n",
+ obd->obd_name, d_name, rc);
+ if (rc == 0)
+ item++;
+ else
rc = 0;
- }
next:
l_dput(dchild);
UNLOCK_INODE_MUTEX(pending_dir);