if (IS_ERR(result))
return result;
- if (S_ISDIR(result->d_inode->i_mode) &&
- (result->d_flags & DCACHE_DISCONNECTED)) {
- /* it is an unconnected directory, we must connect it */
- ;
- } else {
- if (acceptable(context, result))
- return result;
- if (S_ISDIR(result->d_inode->i_mode)) {
+ if (S_ISDIR(result->d_inode->i_mode)) {
+ if (!(result->d_flags & DCACHE_DISCONNECTED)) {
+ if (acceptable(context, result))
+ return result;
err = -EACCES;
goto err_result;
}
+ target_dir = dget(result);
+ } else {
+ if (acceptable(context, result))
+ return result;
+
alias = find_acceptable_alias(result, acceptable, context);
if (alias)
return alias;
- }
- /* It's a directory, or we are required to confirm the file's
- * location in the tree based on the parent information
- */
- dprintk("find_exported_dentry: need to look harder for %s/%d\n",sb->s_id,*(int*)obj);
- if (S_ISDIR(result->d_inode->i_mode))
- target_dir = dget(result);
- else {
if (parent == NULL)
goto err_result;
goto err_result;
}
}
+
/*
* Now we need to make sure that target_dir is properly connected.
* It may already be, as the flag isn't always updated when connection