diff options
Diffstat (limited to 'fs/ntfs/file.c')
-rw-r--r-- | fs/ntfs/file.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/fs/ntfs/file.c b/fs/ntfs/file.c index 5027d3d1b3fe..c63a83e8da98 100644 --- a/fs/ntfs/file.c +++ b/fs/ntfs/file.c | |||
@@ -943,7 +943,8 @@ rl_not_mapped_enoent: | |||
943 | } | 943 | } |
944 | ni->runlist.rl = rl; | 944 | ni->runlist.rl = rl; |
945 | status.runlist_merged = 1; | 945 | status.runlist_merged = 1; |
946 | ntfs_debug("Allocated cluster, lcn 0x%llx.", lcn); | 946 | ntfs_debug("Allocated cluster, lcn 0x%llx.", |
947 | (unsigned long long)lcn); | ||
947 | /* Map and lock the mft record and get the attribute record. */ | 948 | /* Map and lock the mft record and get the attribute record. */ |
948 | if (!NInoAttr(ni)) | 949 | if (!NInoAttr(ni)) |
949 | base_ni = ni; | 950 | base_ni = ni; |
@@ -1206,8 +1207,6 @@ rl_not_mapped_enoent: | |||
1206 | "attribute runlist in error code " | 1207 | "attribute runlist in error code " |
1207 | "path. Run chkdsk to recover the " | 1208 | "path. Run chkdsk to recover the " |
1208 | "lost cluster."); | 1209 | "lost cluster."); |
1209 | make_bad_inode(vi); | ||
1210 | make_bad_inode(VFS_I(base_ni)); | ||
1211 | NVolSetErrors(vol); | 1210 | NVolSetErrors(vol); |
1212 | } else /* if (success) */ { | 1211 | } else /* if (success) */ { |
1213 | status.runlist_merged = 0; | 1212 | status.runlist_merged = 0; |
@@ -1238,8 +1237,6 @@ rl_not_mapped_enoent: | |||
1238 | ntfs_error(vol->sb, "Failed to restore attribute " | 1237 | ntfs_error(vol->sb, "Failed to restore attribute " |
1239 | "record in error code path. Run " | 1238 | "record in error code path. Run " |
1240 | "chkdsk to recover."); | 1239 | "chkdsk to recover."); |
1241 | make_bad_inode(vi); | ||
1242 | make_bad_inode(VFS_I(base_ni)); | ||
1243 | NVolSetErrors(vol); | 1240 | NVolSetErrors(vol); |
1244 | } else /* if (success) */ { | 1241 | } else /* if (success) */ { |
1245 | if (ntfs_mapping_pairs_build(vol, (u8*)a + | 1242 | if (ntfs_mapping_pairs_build(vol, (u8*)a + |
@@ -1252,8 +1249,6 @@ rl_not_mapped_enoent: | |||
1252 | "mapping pairs array in error " | 1249 | "mapping pairs array in error " |
1253 | "code path. Run chkdsk to " | 1250 | "code path. Run chkdsk to " |
1254 | "recover."); | 1251 | "recover."); |
1255 | make_bad_inode(vi); | ||
1256 | make_bad_inode(VFS_I(base_ni)); | ||
1257 | NVolSetErrors(vol); | 1252 | NVolSetErrors(vol); |
1258 | } | 1253 | } |
1259 | flush_dcache_mft_record_page(ctx->ntfs_ino); | 1254 | flush_dcache_mft_record_page(ctx->ntfs_ino); |
@@ -1622,11 +1617,8 @@ err_out: | |||
1622 | unmap_mft_record(base_ni); | 1617 | unmap_mft_record(base_ni); |
1623 | ntfs_error(vi->i_sb, "Failed to update initialized_size/i_size (error " | 1618 | ntfs_error(vi->i_sb, "Failed to update initialized_size/i_size (error " |
1624 | "code %i).", err); | 1619 | "code %i).", err); |
1625 | if (err != -ENOMEM) { | 1620 | if (err != -ENOMEM) |
1626 | NVolSetErrors(ni->vol); | 1621 | NVolSetErrors(ni->vol); |
1627 | make_bad_inode(VFS_I(base_ni)); | ||
1628 | make_bad_inode(vi); | ||
1629 | } | ||
1630 | return err; | 1622 | return err; |
1631 | } | 1623 | } |
1632 | 1624 | ||
@@ -1801,8 +1793,6 @@ err_out: | |||
1801 | ntfs_error(vi->i_sb, "Resident attribute commit write failed " | 1793 | ntfs_error(vi->i_sb, "Resident attribute commit write failed " |
1802 | "with error %i.", err); | 1794 | "with error %i.", err); |
1803 | NVolSetErrors(ni->vol); | 1795 | NVolSetErrors(ni->vol); |
1804 | make_bad_inode(VFS_I(base_ni)); | ||
1805 | make_bad_inode(vi); | ||
1806 | } | 1796 | } |
1807 | if (ctx) | 1797 | if (ctx) |
1808 | ntfs_attr_put_search_ctx(ctx); | 1798 | ntfs_attr_put_search_ctx(ctx); |
@@ -2304,7 +2294,7 @@ static int ntfs_file_fsync(struct file *filp, struct dentry *dentry, | |||
2304 | 2294 | ||
2305 | #endif /* NTFS_RW */ | 2295 | #endif /* NTFS_RW */ |
2306 | 2296 | ||
2307 | struct file_operations ntfs_file_ops = { | 2297 | const struct file_operations ntfs_file_ops = { |
2308 | .llseek = generic_file_llseek, /* Seek inside file. */ | 2298 | .llseek = generic_file_llseek, /* Seek inside file. */ |
2309 | .read = generic_file_read, /* Read from file. */ | 2299 | .read = generic_file_read, /* Read from file. */ |
2310 | .aio_read = generic_file_aio_read, /* Async read from file. */ | 2300 | .aio_read = generic_file_aio_read, /* Async read from file. */ |
@@ -2347,6 +2337,6 @@ struct inode_operations ntfs_file_inode_ops = { | |||
2347 | #endif /* NTFS_RW */ | 2337 | #endif /* NTFS_RW */ |
2348 | }; | 2338 | }; |
2349 | 2339 | ||
2350 | struct file_operations ntfs_empty_file_ops = {}; | 2340 | const struct file_operations ntfs_empty_file_ops = {}; |
2351 | 2341 | ||
2352 | struct inode_operations ntfs_empty_inode_ops = {}; | 2342 | struct inode_operations ntfs_empty_inode_ops = {}; |