If we fail to get top, top is either NULL, or igrab found
that we're in the process of freeing that inode, and did
not grab it. Either way, we didn't grab it, and have no
business putting it.
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Bug:
38117720
Change-Id: Ie2f587483b9abb5144263156a443e89bc69b767b
struct inode tmp;
struct inode *top = grab_top(SDCARDFS_I(inode));
- if (!top) {
- release_top(SDCARDFS_I(inode));
- WARN(1, "Top value was null!\n");
+ if (!top)
return -EINVAL;
- }
/*
* Permission check on sdcardfs inode.
inode = dentry->d_inode;
top = grab_top(SDCARDFS_I(inode));
- if (!top) {
- release_top(SDCARDFS_I(inode));
+ if (!top)
return -EINVAL;
- }
/*
* Permission check on sdcardfs inode.