Skip to content

Commit 1aab1c3

Browse files
drosen-googlepundiramit
authored andcommitted
ANDROID: sdcardfs: Don't d_drop in d_revalidate
After d_revalidate returns 0, the vfs will call d_invalidate, which will call d_drop itself, along with other cleanup. Bug: 78262592 Change-Id: Idbb30e008c05d62edf2217679cb6a5517d8d1a2c Signed-off-by: Daniel Rosenberg <drosen@google.com>
1 parent 4cca346 commit 1aab1c3

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

fs/sdcardfs/dentry.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ static int sdcardfs_d_revalidate(struct dentry *dentry, unsigned int flags)
5151
* whether the base obbpath has been changed or not
5252
*/
5353
if (is_obbpath_invalid(dentry)) {
54-
d_drop(dentry);
5554
return 0;
5655
}
5756

@@ -65,22 +64,19 @@ static int sdcardfs_d_revalidate(struct dentry *dentry, unsigned int flags)
6564
if ((lower_dentry->d_flags & DCACHE_OP_REVALIDATE)) {
6665
err = lower_dentry->d_op->d_revalidate(lower_dentry, flags);
6766
if (err == 0) {
68-
d_drop(dentry);
6967
goto out;
7068
}
7169
}
7270

7371
spin_lock(&lower_dentry->d_lock);
7472
if (d_unhashed(lower_dentry)) {
7573
spin_unlock(&lower_dentry->d_lock);
76-
d_drop(dentry);
7774
err = 0;
7875
goto out;
7976
}
8077
spin_unlock(&lower_dentry->d_lock);
8178

8279
if (parent_lower_dentry != lower_cur_parent_dentry) {
83-
d_drop(dentry);
8480
err = 0;
8581
goto out;
8682
}
@@ -94,7 +90,6 @@ static int sdcardfs_d_revalidate(struct dentry *dentry, unsigned int flags)
9490
}
9591

9692
if (!qstr_case_eq(&dentry->d_name, &lower_dentry->d_name)) {
97-
__d_drop(dentry);
9893
err = 0;
9994
}
10095

@@ -113,7 +108,6 @@ static int sdcardfs_d_revalidate(struct dentry *dentry, unsigned int flags)
113108
if (inode) {
114109
data = top_data_get(SDCARDFS_I(inode));
115110
if (!data || data->abandoned) {
116-
d_drop(dentry);
117111
err = 0;
118112
}
119113
if (data)

0 commit comments

Comments
 (0)