# HG changeset patch # User Paul Boddie # Date 1640726577 -3600 # Node ID cba174322825d39f9b97d3e9b138cc9311f17272 # Parent 778cb5de369695a6aa32fb04bc6021de3e3a5e5f Moved function definition. diff -r 778cb5de3696 -r cba174322825 libfsserver/lib/files/ext2_file_operations.cc --- a/libfsserver/lib/files/ext2_file_operations.cc Tue Dec 28 22:18:04 2021 +0100 +++ b/libfsserver/lib/files/ext2_file_operations.cc Tue Dec 28 22:22:57 2021 +0100 @@ -41,6 +41,16 @@ return _image_isfile(_fs, ino_file); } +/* Perform closing operations on a file. */ + +void Ext2FileOperations::close_file(ext2_file_t file) +{ + std::lock_guard guard(_lock); + + ext2fs_file_flush(file); + ext2fs_file_close(file); +} + /* Create a file in the directory indicated by the given inode number with the given filename. The file is created with the given user permissions. */ @@ -87,16 +97,6 @@ return L4_EOK; } -/* Perform closing operations on a file. */ - -void Ext2FileOperations::close_file(ext2_file_t file) -{ - std::lock_guard guard(_lock); - - ext2fs_file_flush(file); - ext2fs_file_close(file); -} - /* Open the file associated with the indicated inode. */ long Ext2FileOperations::open_file(ext2_ino_t ino, ext2_file_t *file)