commit | b231141bb5324337cf4641bd24030c03901877d4 | [log] [tgz] |
---|---|---|
author | Sahana Rao <sahanas@google.com> | Wed Feb 12 19:56:42 2020 +0000 |
committer | Sahana Rao <sahanas@google.com> | Wed Feb 12 20:50:09 2020 +0000 |
tree | c495c0ad96393fc1e26cbdf629554cc2875bf228 | |
parent | 008682a02e174c85c1bb98d58b9dcb3cd4ba4cf7 [diff] |
Release scanFile directoryLock after updating database. scanFile() on single file should release directoryLock after updating the database. Two apps calling scanFile on same file might try to insert the file into database simultaneously, and one of the insert operation will fail with SQLITE_CONSTRAINT_UNIQUE. We can avoid this by holding the directory lock until the database update is complete. Test: atest FuseDaemonHostTest Change-Id: Ia8cc829d34ac64e7952d506878fd324527f91974