Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 84890
b: refs/heads/master
c: ef58bcc
h: refs/heads/master
v: v3
  • Loading branch information
Al Viro authored and David Teigland committed Feb 4, 2008
1 parent a4df49e commit e3a20e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a5dd06313dbcec3a2c8a5e4a6f3ddb2a8fc72ec9
refs/heads/master: ef58bccab7c7ef34451aa4ceea39545ef126b666
6 changes: 5 additions & 1 deletion trunk/fs/dlm/lock.c
Original file line number Diff line number Diff line change
Expand Up @@ -436,11 +436,15 @@ static int find_rsb(struct dlm_ls *ls, char *name, int namelen,
{
struct dlm_rsb *r, *tmp;
uint32_t hash, bucket;
int error = 0;
int error = -EINVAL;

if (namelen > DLM_RESNAME_MAXLEN)
goto out;

if (dlm_no_directory(ls))
flags |= R_CREATE;

error = 0;
hash = jhash(name, namelen, 0);
bucket = hash & (ls->ls_rsbtbl_size - 1);

Expand Down

0 comments on commit e3a20e2

Please sign in to comment.