mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
[PATCH] sanitize lookup_hash prototype
->permission and ->lookup have a struct nameidata * argument these days to pass down lookup intents. Unfortunately some callers of lookup_hash don't actually pass this one down. For lookup_one_len() we don't have a struct nameidata to pass down, but as this function is a library function only used by filesystem code this is an acceptable limitation. All other callers should pass down the nameidata, so this patch changes the lookup_hash interface to only take a struct nameidata argument and derives the other two arguments to __lookup_hash from it. All callers already have the nameidata argument available so this is not a problem. At the same time I'd like to deprecate the lookup_hash interface as there are better exported interfaces for filesystem usage. Before it can actually be removed I need to fix up rpc_pipefs. Signed-off-by: Christoph Hellwig <[email protected]> Cc: Ram Pai <[email protected]> Cc: Jeff Mahoney <[email protected]> Cc: Al Viro <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
8c744fb83d
commit
49705b7743
4 changed files with 21 additions and 14 deletions
|
|
@ -603,7 +603,7 @@ rpc_lookup_negative(char *path, struct nameidata *nd)
|
|||
return ERR_PTR(error);
|
||||
dir = nd->dentry->d_inode;
|
||||
down(&dir->i_sem);
|
||||
dentry = lookup_hash(&nd->last, nd->dentry);
|
||||
dentry = lookup_hash(nd);
|
||||
if (IS_ERR(dentry))
|
||||
goto out_err;
|
||||
if (dentry->d_inode) {
|
||||
|
|
@ -665,7 +665,7 @@ rpc_rmdir(char *path)
|
|||
return error;
|
||||
dir = nd.dentry->d_inode;
|
||||
down(&dir->i_sem);
|
||||
dentry = lookup_hash(&nd.last, nd.dentry);
|
||||
dentry = lookup_hash(&nd);
|
||||
if (IS_ERR(dentry)) {
|
||||
error = PTR_ERR(dentry);
|
||||
goto out_release;
|
||||
|
|
@ -726,7 +726,7 @@ rpc_unlink(char *path)
|
|||
return error;
|
||||
dir = nd.dentry->d_inode;
|
||||
down(&dir->i_sem);
|
||||
dentry = lookup_hash(&nd.last, nd.dentry);
|
||||
dentry = lookup_hash(&nd);
|
||||
if (IS_ERR(dentry)) {
|
||||
error = PTR_ERR(dentry);
|
||||
goto out_release;
|
||||
|
|
|
|||
Loading…
Reference in a new issue