1.1 --- a/libfsserver/lib/files/ext2_file_operations.cc Tue Dec 28 22:18:04 2021 +0100
1.2 +++ b/libfsserver/lib/files/ext2_file_operations.cc Tue Dec 28 22:22:57 2021 +0100
1.3 @@ -41,6 +41,16 @@
1.4 return _image_isfile(_fs, ino_file);
1.5 }
1.6
1.7 +/* Perform closing operations on a file. */
1.8 +
1.9 +void Ext2FileOperations::close_file(ext2_file_t file)
1.10 +{
1.11 + std::lock_guard<std::mutex> guard(_lock);
1.12 +
1.13 + ext2fs_file_flush(file);
1.14 + ext2fs_file_close(file);
1.15 +}
1.16 +
1.17 /* Create a file in the directory indicated by the given inode number with the
1.18 given filename. The file is created with the given user permissions. */
1.19
1.20 @@ -87,16 +97,6 @@
1.21 return L4_EOK;
1.22 }
1.23
1.24 -/* Perform closing operations on a file. */
1.25 -
1.26 -void Ext2FileOperations::close_file(ext2_file_t file)
1.27 -{
1.28 - std::lock_guard<std::mutex> guard(_lock);
1.29 -
1.30 - ext2fs_file_flush(file);
1.31 - ext2fs_file_close(file);
1.32 -}
1.33 -
1.34 /* Open the file associated with the indicated inode. */
1.35
1.36 long Ext2FileOperations::open_file(ext2_ino_t ino, ext2_file_t *file)