udf: Remove unnecessary bkl usages
The udf_readdir(), udf_lookup(), udf_create(), udf_mknod(), udf_mkdir(), udf_rmdir(), udf_link(), udf_get_parent() and udf_unlink() seems already adequately protected by i_mutex held by VFS invoking calls. The udf_rename() instead should be already protected by lock_rename again by VFS. The udf_ioctl(), udf_fill_super() and udf_evict_inode() don't requires any further protection. This work was supported by a hardware donation from the CE Linux Forum. Signed-off-by: Alessio Igor Bogani <abogani@texware.it> Signed-off-by: Jan Kara <jack@suse.cz>
This commit is contained in:
committed by
Jan Kara
parent
7db09be629
commit
9db9f9e31d
@@ -30,7 +30,6 @@
|
||||
#include <linux/errno.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/buffer_head.h>
|
||||
|
||||
#include "udf_i.h"
|
||||
@@ -190,18 +189,14 @@ static int udf_readdir(struct file *filp, void *dirent, filldir_t filldir)
|
||||
struct inode *dir = filp->f_path.dentry->d_inode;
|
||||
int result;
|
||||
|
||||
lock_kernel();
|
||||
|
||||
if (filp->f_pos == 0) {
|
||||
if (filldir(dirent, ".", 1, filp->f_pos, dir->i_ino, DT_DIR) < 0) {
|
||||
unlock_kernel();
|
||||
return 0;
|
||||
}
|
||||
filp->f_pos++;
|
||||
}
|
||||
|
||||
result = do_udf_readdir(dir, filp, filldir, dirent);
|
||||
unlock_kernel();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user