mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
UPSTREAM: ANDROID: fuse: Don't use readdirplus w/ nodeid 0
If we have a nodeid of 0, we've probably got a backing inode, and a regular getattr will be fast. Otherwise, userspace is likely ill suited to properly handle a readdirplus anyways. Test: fuse_test Bug: 219958836 Signed-off-by: Daniel Rosenberg <[email protected]> Change-Id: I02f031d87dcc5fcbe1e080e4f8ec92187b00fe2d
This commit is contained in:
parent
f72a971ce7
commit
a82e300d0c
1 changed files with 2 additions and 0 deletions
|
|
@ -20,6 +20,8 @@ static bool fuse_use_readdirplus(struct inode *dir, struct dir_context *ctx)
|
|||
|
||||
if (!fc->do_readdirplus)
|
||||
return false;
|
||||
if (fi->nodeid == 0)
|
||||
return false;
|
||||
if (!fc->readdirplus_auto)
|
||||
return true;
|
||||
if (test_and_clear_bit(FUSE_I_ADVISE_RDPLUS, &fi->state))
|
||||
|
|
|
|||
Loading…
Reference in a new issue