* Use is subject to license terms.
*/
/*
+ * Copyright (c) 2012 Whamcloud, Inc.
+ */
+/*
* This file is part of Lustre, http://www.lustre.org/
* Lustre is a trademark of Sun Microsystems, Inc.
*
# include <linux/fs.h>
# include <linux/dcache.h>
# ifdef CONFIG_FS_POSIX_ACL
-# ifdef HAVE_XATTR_ACL
-# include <linux/xattr_acl.h>
-# endif /*HAVE_XATTR_ACL */
-# ifdef HAVE_LINUX_POSIX_ACL_XATTR_H
-# include <linux/posix_acl_xattr.h>
-# endif /* HAVE_LINUX_POSIX_ACL_XATTR_H */
+# include <linux/posix_acl_xattr.h>
# endif /* CONFIG_FS_POSIX_ACL */
-# ifndef HAVE_VFS_INTENT_PATCHES
# include <linux/lustre_intent.h>
-# endif /* HAVE_VFS_INTENT_PATCHES */
#endif /* __KERNEL__ */
#include <lustre_handles.h>
#include <libcfs/libcfs.h>
struct obd_device;
struct mdc_rpc_lock {
- cfs_semaphore_t rpcl_sem;
+ cfs_mutex_t rpcl_mutex;
struct lookup_intent *rpcl_it;
};
static inline void mdc_init_rpc_lock(struct mdc_rpc_lock *lck)
{
- cfs_sema_init(&lck->rpcl_sem, 1);
+ cfs_mutex_init(&lck->rpcl_mutex);
lck->rpcl_it = NULL;
}
{
ENTRY;
if (!it || (it->it_op != IT_GETATTR && it->it_op != IT_LOOKUP)) {
- cfs_down(&lck->rpcl_sem);
+ cfs_mutex_lock(&lck->rpcl_mutex);
LASSERT(lck->rpcl_it == NULL);
lck->rpcl_it = it;
}
if (!it || (it->it_op != IT_GETATTR && it->it_op != IT_LOOKUP)) {
LASSERT(it == lck->rpcl_it);
lck->rpcl_it = NULL;
- cfs_up(&lck->rpcl_sem);
+ cfs_mutex_unlock(&lck->rpcl_mutex);
}
EXIT;
}