Skip to content
Snippets Groups Projects
Commit 85c45e86 authored by Daniel Rosenberg's avatar Daniel Rosenberg
Browse files

ANDROID: sdcardfs: Check for NULL in revalidate


If the inode is in the process of being evicted,
the top value may be NULL.

Signed-off-by: default avatarDaniel Rosenberg <drosen@google.com>
Bug: 38502532
Change-Id: I0b9d04aab621e0398d44d1c5dc53293106aa5f89
parent e659eb9e
Branches
Tags
No related merge requests found
......@@ -109,14 +109,16 @@ static int sdcardfs_d_revalidate(struct dentry *dentry, unsigned int flags)
goto out;
/* If our top's inode is gone, we may be out of date */
inode = dentry->d_inode;
inode = igrab(dentry->d_inode);
if (inode) {
data = top_data_get(SDCARDFS_I(inode));
if (data->abandoned) {
if (!data || data->abandoned) {
d_drop(dentry);
err = 0;
}
if (data)
data_put(data);
iput(inode);
}
out:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment