diff options
author | Pekka Enberg <penberg@kernel.org> | 2010-10-24 19:57:05 +0300 |
---|---|---|
committer | Pekka Enberg <penberg@kernel.org> | 2010-10-24 19:57:05 +0300 |
commit | 6d4121f6c20a0e86231d52f535f1c82423b3326f (patch) | |
tree | 5c235cac699ca86b504850aa663ddadde0455a61 /fs/freevxfs/vxfs_lookup.c | |
parent | 92a5bbc11ff2442a54b2f1d313088c245828ef4e (diff) | |
parent | 35da7a307c535f9c2929cae277f3df425c9f9b1e (diff) |
Merge branch 'master' into for-linus
Conflicts:
include/linux/percpu.h
mm/percpu.c
Diffstat (limited to 'fs/freevxfs/vxfs_lookup.c')
-rw-r--r-- | fs/freevxfs/vxfs_lookup.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/fs/freevxfs/vxfs_lookup.c b/fs/freevxfs/vxfs_lookup.c index 0ec7bb2c95c..6c5131d592f 100644 --- a/fs/freevxfs/vxfs_lookup.c +++ b/fs/freevxfs/vxfs_lookup.c @@ -36,7 +36,6 @@ #include <linux/highmem.h> #include <linux/kernel.h> #include <linux/pagemap.h> -#include <linux/smp_lock.h> #include "vxfs.h" #include "vxfs_dir.h" @@ -212,16 +211,12 @@ vxfs_lookup(struct inode *dip, struct dentry *dp, struct nameidata *nd) if (dp->d_name.len > VXFS_NAMELEN) return ERR_PTR(-ENAMETOOLONG); - lock_kernel(); ino = vxfs_inode_by_name(dip, dp); if (ino) { ip = vxfs_iget(dip->i_sb, ino); - if (IS_ERR(ip)) { - unlock_kernel(); + if (IS_ERR(ip)) return ERR_CAST(ip); - } } - unlock_kernel(); d_add(dp, ip); return NULL; } @@ -248,8 +243,6 @@ vxfs_readdir(struct file *fp, void *retp, filldir_t filler) u_long page, npages, block, pblocks, nblocks, offset; loff_t pos; - lock_kernel(); - switch ((long)fp->f_pos) { case 0: if (filler(retp, ".", 1, fp->f_pos, ip->i_ino, DT_DIR) < 0) @@ -265,10 +258,8 @@ vxfs_readdir(struct file *fp, void *retp, filldir_t filler) pos = fp->f_pos - 2; - if (pos > VXFS_DIRROUND(ip->i_size)) { - unlock_kernel(); + if (pos > VXFS_DIRROUND(ip->i_size)) return 0; - } npages = dir_pages(ip); nblocks = dir_blocks(ip); @@ -327,6 +318,5 @@ vxfs_readdir(struct file *fp, void *retp, filldir_t filler) done: fp->f_pos = ((page << PAGE_CACHE_SHIFT) | offset) + 2; out: - unlock_kernel(); return 0; } |