Skip to content

Commit 5a9a436

Browse files
koct9iAl Viro
authored andcommitted
vfs: use ERR_CAST for err-ptr tossing in lookup_instantiate_filp
Replace unclear (struct dentry *) to (struct file *) typecast with ERR_CAST() macro. Signed-off-by: Konstantin Khlebnikov <[email protected]> Signed-off-by: Al Viro <[email protected]>
1 parent d769b3c commit 5a9a436

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/open.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,7 @@ struct file *lookup_instantiate_filp(struct nameidata *nd, struct dentry *dentry
793793
return nd->intent.open.file;
794794
out_err:
795795
release_open_intent(nd);
796-
nd->intent.open.file = (struct file *)dentry;
796+
nd->intent.open.file = ERR_CAST(dentry);
797797
goto out;
798798
}
799799
EXPORT_SYMBOL_GPL(lookup_instantiate_filp);

0 commit comments

Comments
 (0)