Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 143652
b: refs/heads/master
c: f3b8fa7
h: refs/heads/master
v: v3
  • Loading branch information
Evgeniy Polyakov authored and Greg Kroah-Hartman committed Apr 17, 2009
1 parent 5d8865b commit e2576ae
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 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: 288a9a8955cd28bf6a0f48ec821cf9028e96081b
refs/heads/master: f3b8fa701b4bd8ec6d378896ad005f01e8382381
16 changes: 8 additions & 8 deletions trunk/drivers/staging/pohmelfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,11 +389,11 @@ static int pohmelfs_readdir(struct file *file, void *dirent, filldir_t filldir)
dprintk("%s: parent: %llu, fpos: %llu, hash: %08lx.\n",
__func__, pi->ino, (u64)file->f_pos,
(unsigned long)file->private_data);

#if 0
err = pohmelfs_data_lock(pi, 0, ~0, POHMELFS_READ_LOCK);
if (err)
return err;

#endif
err = pohmelfs_sync_remote_dir(pi);
if (err)
return err;
Expand Down Expand Up @@ -513,10 +513,6 @@ struct dentry *pohmelfs_lookup(struct inode *dir, struct dentry *dentry, struct

need_lock = pohmelfs_need_lock(parent, lock_type);

err = pohmelfs_data_lock(parent, 0, ~0, lock_type);
if (err)
goto out;

str.hash = jhash(dentry->d_name.name, dentry->d_name.len, 0);

mutex_lock(&parent->offset_lock);
Expand All @@ -525,7 +521,7 @@ struct dentry *pohmelfs_lookup(struct inode *dir, struct dentry *dentry, struct
ino = n->ino;
mutex_unlock(&parent->offset_lock);

dprintk("%s: 1 ino: %lu, inode: %p, name: '%s', hash: %x, parent_state: %lx.\n",
dprintk("%s: start ino: %lu, inode: %p, name: '%s', hash: %x, parent_state: %lx.\n",
__func__, ino, inode, str.name, str.hash, parent->state);

if (ino) {
Expand All @@ -534,7 +530,7 @@ struct dentry *pohmelfs_lookup(struct inode *dir, struct dentry *dentry, struct
goto out;
}

dprintk("%s: dir: %p, dir_ino: %llu, name: '%s', len: %u, dir_state: %lx, ino: %lu.\n",
dprintk("%s: no inode dir: %p, dir_ino: %llu, name: '%s', len: %u, dir_state: %lx, ino: %lu.\n",
__func__, dir, parent->ino,
str.name, str.len, parent->state, ino);

Expand All @@ -543,6 +539,10 @@ struct dentry *pohmelfs_lookup(struct inode *dir, struct dentry *dentry, struct
goto out;
}

err = pohmelfs_data_lock(parent, 0, ~0, lock_type);
if (err)
goto out;

err = pohmelfs_lookup_single(parent, &str, ino);
if (err)
goto out;
Expand Down

0 comments on commit e2576ae

Please sign in to comment.