Skip to content

Commit e919328

Browse files
author
Al Viro
committed
__inode_security_revalidate() never gets NULL opt_dentry
Signed-off-by: Al Viro <[email protected]>
1 parent 2220c5b commit e919328

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

security/selinux/hooks.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -274,11 +274,10 @@ static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dent
274274
* Try reloading inode security labels that have been marked as invalid. The
275275
* @may_sleep parameter indicates when sleeping and thus reloading labels is
276276
* allowed; when set to false, returns -ECHILD when the label is
277-
* invalid. The @opt_dentry parameter should be set to a dentry of the inode;
278-
* when no dentry is available, set it to NULL instead.
277+
* invalid. The @dentry parameter should be set to a dentry of the inode.
279278
*/
280279
static int __inode_security_revalidate(struct inode *inode,
281-
struct dentry *opt_dentry,
280+
struct dentry *dentry,
282281
bool may_sleep)
283282
{
284283
struct inode_security_struct *isec = inode->i_security;
@@ -295,7 +294,7 @@ static int __inode_security_revalidate(struct inode *inode,
295294
* @opt_dentry is NULL and no dentry for this inode can be
296295
* found; in that case, continue using the old label.
297296
*/
298-
inode_doinit_with_dentry(inode, opt_dentry);
297+
inode_doinit_with_dentry(inode, dentry);
299298
}
300299
return 0;
301300
}

0 commit comments

Comments
 (0)