
Dear Stefan Brüns,
On Sun, Dec 11, 2016 at 3:32 AM, Stefan Brüns stefan.bruens@rwth-aachen.de wrote:
get_fatent_value(...) flushes changed FAT entries to disk when fetching the next FAT blocks, in every other aspect it is identical to get_fatent(...).
Provide a stub implementation for flush_dirty_fat_buffer if CONFIG_FAT_WRITE is not set. Calling flush_dirty_fat_buffer during read only operation is fine as it checks if any buffers needs flushing.
Signed-off-by: Stefan Brüns stefan.bruens@rwth-aachen.de
fs/fat/fat.c | 19 +++++++++ fs/fat/fat_write.c | 118 +++-------------------------------------------------- 2 files changed, 24 insertions(+), 113 deletions(-)
[...]
diff --git a/fs/fat/fat_write.c b/fs/fat/fat_write.c index 0be60ecd99..c05fc7f099 100644 --- a/fs/fat/fat_write.c +++ b/fs/fat/fat_write.c @@ -143,114 +143,6 @@ static int flush_dirty_fat_buffer(fsdata *mydata) }
/*
- Get the entry at index 'entry' in a FAT (12/16/32) table.
- On failure 0x00 is returned.
- When bufnum is changed, write back the previous fatbuf to the disk.
- */
-static __u32 get_fatent_value(fsdata *mydata, __u32 entry) -{
[...]
debug("FAT%d: ret: %08x, entry: %08x, offset: %04x\n",
mydata->fatsize, ret, entry, offset);
It might be worth adding this entry info to the same line in get_fatent().
return ret;
-}
[...]
Apart from that: Reviewed-by: Benoît Thébaudeau benoit.thebaudeau.dev@gmail.com
Best regards, Benoît