Skip to content

Commit

Permalink
lustre: get rid of pointless casts to struct dentry *
Browse files Browse the repository at this point in the history
... when feeding const struct dentry * to primitives taking
exactly that.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Mar 29, 2018
1 parent cd1c0c9 commit 5bf1ddf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/staging/lustre/lustre/llite/dcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ static int ll_dcompare(const struct dentry *dentry,
d_count(dentry));

/* mountpoint is always valid */
if (d_mountpoint((struct dentry *)dentry))
if (d_mountpoint(dentry))
return 0;

if (d_lustre_invalid(dentry))
Expand All @@ -111,15 +111,15 @@ static int ll_ddelete(const struct dentry *de)
LASSERT(de);

CDEBUG(D_DENTRY, "%s dentry %pd (%p, parent %p, inode %p) %s%s\n",
d_lustre_invalid((struct dentry *)de) ? "deleting" : "keeping",
d_lustre_invalid(de) ? "deleting" : "keeping",
de, de, de->d_parent, d_inode(de),
d_unhashed(de) ? "" : "hashed,",
list_empty(&de->d_subdirs) ? "" : "subdirs");

/* kernel >= 2.6.38 last refcount is decreased after this function. */
LASSERT(d_count(de) == 1);

if (d_lustre_invalid((struct dentry *)de))
if (d_lustre_invalid(de))
return 1;
return 0;
}
Expand Down

0 comments on commit 5bf1ddf

Please sign in to comment.