Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fat: introduce mark_fsinfo_dirty helper

A preparation patch which introduces a 'mark_fsinfo_dirty()' helper
function which just sets the 's_dirt' flag to 1 so far. I'll add more
code to this helper later, so I do not mark it as 'inline'.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Artem Bityutskiy and committed by
Linus Torvalds
90b43665 020ac5b6

+9 -4
+9 -4
fs/fat/fatent.c
··· 308 308 } 309 309 } 310 310 311 + static void mark_fsinfo_dirty(struct super_block *sb) 312 + { 313 + sb->s_dirt = 1; 314 + } 315 + 311 316 static inline int fat_ent_update_ptr(struct super_block *sb, 312 317 struct fat_entry *fatent, 313 318 int offset, sector_t blocknr) ··· 503 498 sbi->prev_free = entry; 504 499 if (sbi->free_clusters != -1) 505 500 sbi->free_clusters--; 506 - sb->s_dirt = 1; 501 + mark_fsinfo_dirty(sb); 507 502 508 503 cluster[idx_clus] = entry; 509 504 idx_clus++; ··· 525 520 /* Couldn't allocate the free entries */ 526 521 sbi->free_clusters = 0; 527 522 sbi->free_clus_valid = 1; 528 - sb->s_dirt = 1; 523 + mark_fsinfo_dirty(sb); 529 524 err = -ENOSPC; 530 525 531 526 out: ··· 592 587 ops->ent_put(&fatent, FAT_ENT_FREE); 593 588 if (sbi->free_clusters != -1) { 594 589 sbi->free_clusters++; 595 - sb->s_dirt = 1; 590 + mark_fsinfo_dirty(sb); 596 591 } 597 592 598 593 if (nr_bhs + fatent.nr_bhs > MAX_BUF_PER_PAGE) { ··· 682 677 } 683 678 sbi->free_clusters = free; 684 679 sbi->free_clus_valid = 1; 685 - sb->s_dirt = 1; 680 + mark_fsinfo_dirty(sb); 686 681 fatent_brelse(&fatent); 687 682 out: 688 683 unlock_fat(sbi);