diff options
Diffstat (limited to 'fs/ntfs')
-rw-r--r-- | fs/ntfs/super.c | 33 |
1 files changed, 3 insertions, 30 deletions
diff --git a/fs/ntfs/super.c b/fs/ntfs/super.c index a9ec4e1084e4..7a7b0d326395 100644 --- a/fs/ntfs/super.c +++ b/fs/ntfs/super.c | |||
@@ -2376,39 +2376,12 @@ static void ntfs_put_super(struct super_block *sb) | |||
2376 | vol->mftmirr_ino = NULL; | 2376 | vol->mftmirr_ino = NULL; |
2377 | } | 2377 | } |
2378 | /* | 2378 | /* |
2379 | * If any dirty inodes are left, throw away all mft data page cache | 2379 | * We should have no dirty inodes left, due to |
2380 | * pages to allow a clean umount. This should never happen any more | 2380 | * mft.c::ntfs_mft_writepage() cleaning all the dirty pages as |
2381 | * due to mft.c::ntfs_mft_writepage() cleaning all the dirty pages as | 2381 | * the underlying mft records are written out and cleaned. |
2382 | * the underlying mft records are written out and cleaned. If it does, | ||
2383 | * happen anyway, we want to know... | ||
2384 | */ | 2382 | */ |
2385 | ntfs_commit_inode(vol->mft_ino); | 2383 | ntfs_commit_inode(vol->mft_ino); |
2386 | write_inode_now(vol->mft_ino, 1); | 2384 | write_inode_now(vol->mft_ino, 1); |
2387 | if (sb_has_dirty_inodes(sb)) { | ||
2388 | const char *s1, *s2; | ||
2389 | |||
2390 | mutex_lock(&vol->mft_ino->i_mutex); | ||
2391 | truncate_inode_pages(vol->mft_ino->i_mapping, 0); | ||
2392 | mutex_unlock(&vol->mft_ino->i_mutex); | ||
2393 | write_inode_now(vol->mft_ino, 1); | ||
2394 | if (sb_has_dirty_inodes(sb)) { | ||
2395 | static const char *_s1 = "inodes"; | ||
2396 | static const char *_s2 = ""; | ||
2397 | s1 = _s1; | ||
2398 | s2 = _s2; | ||
2399 | } else { | ||
2400 | static const char *_s1 = "mft pages"; | ||
2401 | static const char *_s2 = "They have been thrown " | ||
2402 | "away. "; | ||
2403 | s1 = _s1; | ||
2404 | s2 = _s2; | ||
2405 | } | ||
2406 | ntfs_error(sb, "Dirty %s found at umount time. %sYou should " | ||
2407 | "run chkdsk. Please email " | ||
2408 | "linux-ntfs-dev@lists.sourceforge.net and say " | ||
2409 | "that you saw this message. Thank you.", s1, | ||
2410 | s2); | ||
2411 | } | ||
2412 | #endif /* NTFS_RW */ | 2385 | #endif /* NTFS_RW */ |
2413 | 2386 | ||
2414 | iput(vol->mft_ino); | 2387 | iput(vol->mft_ino); |