])
])
-# 2.6.26 remove path_release and use path_put instead
-AC_DEFUN([LC_PATH_RELEASE],
-[AC_MSG_CHECKING([if path_release exist])
-LB_LINUX_TRY_COMPILE([
- #include <linux/dcache.h>
- #include <linux/namei.h>
-],[
- path_release(NULL);
-],[
- AC_DEFINE(HAVE_PATH_RELEASE, 1, [path_release exist])
- AC_MSG_RESULT([yes])
-],[
- AC_MSG_RESULT([no])
-])
-])
-
#2.6.27
AC_DEFUN([LC_INODE_PERMISION_2ARGS],
[AC_MSG_CHECKING([inode_operations->permission have two args])
# 2.6.26
LC_FS_STRUCT_USE_PATH
LC_RCU_LIST_SAFE
- LC_PATH_RELEASE
# 2.6.27
LC_INODE_PERMISION_2ARGS
#ifdef HAVE_FS_STRUCT_USE_PATH
#define cfs_fs_pwd(fs) ((fs)->pwd.dentry)
#define cfs_fs_mnt(fs) ((fs)->pwd.mnt)
+#define cfs_path_put(nd) path_put(&(nd)->path)
#else
#define cfs_fs_pwd(fs) ((fs)->pwd)
#define cfs_fs_mnt(fs) ((fs)->pwdmnt)
+#define cfs_path_put(nd) path_release(nd)
#endif
#ifndef list_for_each_safe_rcu
ENTRY;
down_write(&cli->cl_sem);
+ if (cli->cl_conn_count > 0)
+ GOTO(out_sem, rc = -EALREADY);
+
rc = class_connect(dlm_handle, obd, cluuid);
if (rc)
GOTO(out_sem, rc);
cli->cl_conn_count++;
- if (cli->cl_conn_count > 1)
- GOTO(out_sem, rc = -EALREADY);
*exp = class_conn2export(dlm_handle);
if (obd->obd_namespace != NULL)
up(&lli->lli_size_sem);
}
if (rc) {
-#ifdef HAVE_PATH_RELEASE
- path_release(nd); /* Kernel assumes that ->follow_link()
+ cfs_path_put(nd); /* Kernel assumes that ->follow_link()
releases nameidata on error */
-#else
- path_put(&nd->path);
-#endif
GOTO(out, rc);
}
struct obd_device *mdc_obd;
struct llog_ctxt *ctxt = llog_get_context(obd, LLOG_TEST_ORIG_CTXT);
struct obd_uuid *mds_uuid = &ctxt->loc_exp->exp_obd->obd_uuid;
- struct obd_uuid uuid = {"LLOG_TEST6_UUID"};
struct llog_handle *llh = NULL;
struct llog_ctxt *nctxt;
int rc;