git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
fs
/
ocfs2
/
dlm
/
dlmlock.c
diff --git
a/fs/ocfs2/dlm/dlmlock.c
b/fs/ocfs2/dlm/dlmlock.c
index
5ca57ec
..
e5ca3db
100644
(file)
--- a/
fs/ocfs2/dlm/dlmlock.c
+++ b/
fs/ocfs2/dlm/dlmlock.c
@@
-408,13
+408,13
@@
struct dlm_lock * dlm_new_lock(int type, u8 node, u64 cookie,
struct dlm_lock *lock;
int kernel_allocated = 0;
struct dlm_lock *lock;
int kernel_allocated = 0;
- lock = k
calloc(1,
sizeof(*lock), GFP_NOFS);
+ lock = k
zalloc(
sizeof(*lock), GFP_NOFS);
if (!lock)
return NULL;
if (!lksb) {
/* zero memory only if kernel-allocated */
if (!lock)
return NULL;
if (!lksb) {
/* zero memory only if kernel-allocated */
- lksb = k
calloc(1,
sizeof(*lksb), GFP_NOFS);
+ lksb = k
zalloc(
sizeof(*lksb), GFP_NOFS);
if (!lksb) {
kfree(lock);
return NULL;
if (!lksb) {
kfree(lock);
return NULL;
@@
-540,8
+540,8
@@
static inline void dlm_get_next_cookie(u8 node_num, u64 *cookie)
enum dlm_status dlmlock(struct dlm_ctxt *dlm, int mode,
struct dlm_lockstatus *lksb, int flags,
enum dlm_status dlmlock(struct dlm_ctxt *dlm, int mode,
struct dlm_lockstatus *lksb, int flags,
- const char *name,
dlm_astlockfunc_t *ast, void *data
,
- dlm_bastlockfunc_t *bast)
+ const char *name,
int namelen, dlm_astlockfunc_t *ast
,
+
void *data,
dlm_bastlockfunc_t *bast)
{
enum dlm_status status;
struct dlm_lock_resource *res = NULL;
{
enum dlm_status status;
struct dlm_lock_resource *res = NULL;
@@
-571,7
+571,7
@@
enum dlm_status dlmlock(struct dlm_ctxt *dlm, int mode,
recovery = (flags & LKM_RECOVERY);
if (recovery &&
recovery = (flags & LKM_RECOVERY);
if (recovery &&
- (!dlm_is_recovery_lock(name,
strlen(name)
) || convert) ) {
+ (!dlm_is_recovery_lock(name,
namelen
) || convert) ) {
dlm_error(status);
goto error;
}
dlm_error(status);
goto error;
}
@@
-643,7
+643,7
@@
retry_convert:
}
status = DLM_IVBUFLEN;
}
status = DLM_IVBUFLEN;
- if (
strlen(name) > DLM_LOCKID_NAME_MAX || strlen(name)
< 1) {
+ if (
namelen > DLM_LOCKID_NAME_MAX || namelen
< 1) {
dlm_error(status);
goto error;
}
dlm_error(status);
goto error;
}
@@
-659,7
+659,7
@@
retry_convert:
dlm_wait_for_recovery(dlm);
/* find or create the lock resource */
dlm_wait_for_recovery(dlm);
/* find or create the lock resource */
- res = dlm_get_lock_resource(dlm, name, flags);
+ res = dlm_get_lock_resource(dlm, name,
namelen,
flags);
if (!res) {
status = DLM_IVLOCKID;
dlm_error(status);
if (!res) {
status = DLM_IVLOCKID;
dlm_error(status);