Recent kernels print a warning when lookup_one_len() is called w/o the parent dir locked.
sptlrpc_target_local_copy_conf() should not call lookup_one_len() directly, but ll_lookup_one_len()
instead which locks the parent dir for you and also checks for bad inode.
Change-Id: I4d020c55382238bbbc6df6017f54b5b585f53c48
Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/303
Tested-by: Hudson
Reviewed-by: Oleg Drokin <green@whamcloud.com>
}
CDEBUG(D_INODE, "looking up object O/%.*s/%s\n",
dparent->d_name.len, dparent->d_name.name, name);
- dchild = /*ll_*/lookup_one_len(name, dparent, len);
+ /* dparent is already locked here, so we cannot use ll_lookup_one_len() */
+ dchild = lookup_one_len(name, dparent, len);
if (dir_dentry == NULL)
filter_parent_unlock(dparent);
if (IS_ERR(dchild)) {
push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
- dentry = lookup_one_len(MOUNT_CONFIGS_DIR, cfs_fs_pwd(current->fs),
- strlen(MOUNT_CONFIGS_DIR));
+ dentry = ll_lookup_one_len(MOUNT_CONFIGS_DIR, cfs_fs_pwd(current->fs),
+ strlen(MOUNT_CONFIGS_DIR));
if (IS_ERR(dentry)) {
rc = PTR_ERR(dentry);
CERROR("cannot lookup %s directory: rc = %d\n",