Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a7b4a9d4 authored by Jaegeuk Kim's avatar Jaegeuk Kim
Browse files

Call sync() to guarantee blocks were released by unlink



Otherwise, the cached inode does not release the blocks which causes next
allocation for pinning fails.

Bug: 349270107
Change-Id: I4c2886683ea1949c1999e551a80b56dc37459dba
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@google.com>
parent b2bd7ae8
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -60,6 +60,7 @@ static_assert(sizeof(off_t) == sizeof(uint64_t));
static inline void cleanup(const std::string& file_path, bool created) {
    if (created) {
        unlink(file_path.c_str());
        sync();
    }
}