From 51640ef986ae1c5cf79e553676e36c903a751a26 Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Thu, 31 May 2012 16:26:12 -0700 Subject: [PATCH] --- yaml --- r: 309724 b: refs/heads/master c: 90b436657efb1a6d73bf0677fedee8a8c77032f6 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/fat/fatent.c | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 9480f700f085..a0b0e37d351a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 020ac5b6bef15785f9dde9de89d2734ff97da733 +refs/heads/master: 90b436657efb1a6d73bf0677fedee8a8c77032f6 diff --git a/trunk/fs/fat/fatent.c b/trunk/fs/fat/fatent.c index 2e81ac0df7e2..e49d27463b67 100644 --- a/trunk/fs/fat/fatent.c +++ b/trunk/fs/fat/fatent.c @@ -308,6 +308,11 @@ void fat_ent_access_init(struct super_block *sb) } } +static void mark_fsinfo_dirty(struct super_block *sb) +{ + sb->s_dirt = 1; +} + static inline int fat_ent_update_ptr(struct super_block *sb, struct fat_entry *fatent, int offset, sector_t blocknr) @@ -498,7 +503,7 @@ int fat_alloc_clusters(struct inode *inode, int *cluster, int nr_cluster) sbi->prev_free = entry; if (sbi->free_clusters != -1) sbi->free_clusters--; - sb->s_dirt = 1; + mark_fsinfo_dirty(sb); cluster[idx_clus] = entry; idx_clus++; @@ -520,7 +525,7 @@ int fat_alloc_clusters(struct inode *inode, int *cluster, int nr_cluster) /* Couldn't allocate the free entries */ sbi->free_clusters = 0; sbi->free_clus_valid = 1; - sb->s_dirt = 1; + mark_fsinfo_dirty(sb); err = -ENOSPC; out: @@ -587,7 +592,7 @@ int fat_free_clusters(struct inode *inode, int cluster) ops->ent_put(&fatent, FAT_ENT_FREE); if (sbi->free_clusters != -1) { sbi->free_clusters++; - sb->s_dirt = 1; + mark_fsinfo_dirty(sb); } if (nr_bhs + fatent.nr_bhs > MAX_BUF_PER_PAGE) { @@ -677,7 +682,7 @@ int fat_count_free_clusters(struct super_block *sb) } sbi->free_clusters = free; sbi->free_clus_valid = 1; - sb->s_dirt = 1; + mark_fsinfo_dirty(sb); fatent_brelse(&fatent); out: unlock_fat(sbi);