aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/ntfs/ChangeLog3
-rw-r--r--fs/ntfs/inode.c26
-rw-r--r--fs/ntfs/mft.c5
3 files changed, 15 insertions, 19 deletions
diff --git a/fs/ntfs/ChangeLog b/fs/ntfs/ChangeLog
index a3a9d4b97979..5fb74e62f535 100644
--- a/fs/ntfs/ChangeLog
+++ b/fs/ntfs/ChangeLog
@@ -38,6 +38,9 @@ ToDo/Notes:
38 allowed by NTFS, i.e. 255 Unicode characters, not including the 38 allowed by NTFS, i.e. 255 Unicode characters, not including the
39 terminating NULL (which is not stored on disk). 39 terminating NULL (which is not stored on disk).
40 - Improve comments on file attribute flags in fs/ntfs/layout.h. 40 - Improve comments on file attribute flags in fs/ntfs/layout.h.
41 - Fix a bug in fs/ntfs/inode.c::ntfs_read_locked_index_inode() where we
42 forgot to update a temporary variable so loading index inodes which
43 have an index allocation attribute failed.
41 44
422.1.26 - Minor bug fixes and updates. 452.1.26 - Minor bug fixes and updates.
43 46
diff --git a/fs/ntfs/inode.c b/fs/ntfs/inode.c
index ae341922f423..5f4b23d213b9 100644
--- a/fs/ntfs/inode.c
+++ b/fs/ntfs/inode.c
@@ -19,15 +19,19 @@
19 * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */ 20 */
21 21
22#include <linux/pagemap.h>
23#include <linux/buffer_head.h> 22#include <linux/buffer_head.h>
24#include <linux/smp_lock.h> 23#include <linux/fs.h>
25#include <linux/quotaops.h> 24#include <linux/mm.h>
26#include <linux/mount.h> 25#include <linux/mount.h>
27#include <linux/mutex.h> 26#include <linux/mutex.h>
27#include <linux/pagemap.h>
28#include <linux/quotaops.h>
29#include <linux/slab.h>
30#include <linux/smp_lock.h>
28 31
29#include "aops.h" 32#include "aops.h"
30#include "attrib.h" 33#include "attrib.h"
34#include "bitmap.h"
31#include "dir.h" 35#include "dir.h"
32#include "debug.h" 36#include "debug.h"
33#include "inode.h" 37#include "inode.h"
@@ -1428,7 +1432,6 @@ err_out:
1428 "Run chkdsk.", err, vi->i_ino, ni->type, ni->name_len, 1432 "Run chkdsk.", err, vi->i_ino, ni->type, ni->name_len,
1429 base_vi->i_ino); 1433 base_vi->i_ino);
1430 make_bad_inode(vi); 1434 make_bad_inode(vi);
1431 make_bad_inode(base_vi);
1432 if (err != -ENOMEM) 1435 if (err != -ENOMEM)
1433 NVolSetErrors(vol); 1436 NVolSetErrors(vol);
1434 return err; 1437 return err;
@@ -1613,6 +1616,7 @@ static int ntfs_read_locked_index_inode(struct inode *base_vi, struct inode *vi)
1613 "$INDEX_ALLOCATION attribute."); 1616 "$INDEX_ALLOCATION attribute.");
1614 goto unm_err_out; 1617 goto unm_err_out;
1615 } 1618 }
1619 a = ctx->attr;
1616 if (!a->non_resident) { 1620 if (!a->non_resident) {
1617 ntfs_error(vi->i_sb, "$INDEX_ALLOCATION attribute is " 1621 ntfs_error(vi->i_sb, "$INDEX_ALLOCATION attribute is "
1618 "resident."); 1622 "resident.");
@@ -2845,11 +2849,8 @@ done:
2845old_bad_out: 2849old_bad_out:
2846 old_size = -1; 2850 old_size = -1;
2847bad_out: 2851bad_out:
2848 if (err != -ENOMEM && err != -EOPNOTSUPP) { 2852 if (err != -ENOMEM && err != -EOPNOTSUPP)
2849 make_bad_inode(vi);
2850 make_bad_inode(VFS_I(base_ni));
2851 NVolSetErrors(vol); 2853 NVolSetErrors(vol);
2852 }
2853 if (err != -EOPNOTSUPP) 2854 if (err != -EOPNOTSUPP)
2854 NInoSetTruncateFailed(ni); 2855 NInoSetTruncateFailed(ni);
2855 else if (old_size >= 0) 2856 else if (old_size >= 0)
@@ -2864,11 +2865,8 @@ out:
2864 ntfs_debug("Failed. Returning error code %i.", err); 2865 ntfs_debug("Failed. Returning error code %i.", err);
2865 return err; 2866 return err;
2866conv_err_out: 2867conv_err_out:
2867 if (err != -ENOMEM && err != -EOPNOTSUPP) { 2868 if (err != -ENOMEM && err != -EOPNOTSUPP)
2868 make_bad_inode(vi);
2869 make_bad_inode(VFS_I(base_ni));
2870 NVolSetErrors(vol); 2869 NVolSetErrors(vol);
2871 }
2872 if (err != -EOPNOTSUPP) 2870 if (err != -EOPNOTSUPP)
2873 NInoSetTruncateFailed(ni); 2871 NInoSetTruncateFailed(ni);
2874 else 2872 else
@@ -3116,9 +3114,7 @@ err_out:
3116 "retries later."); 3114 "retries later.");
3117 mark_inode_dirty(vi); 3115 mark_inode_dirty(vi);
3118 } else { 3116 } else {
3119 ntfs_error(vi->i_sb, "Failed (error code %i): Marking inode " 3117 ntfs_error(vi->i_sb, "Failed (error %i): Run chkdsk.", -err);
3120 "as bad. You should run chkdsk.", -err);
3121 make_bad_inode(vi);
3122 NVolSetErrors(ni->vol); 3118 NVolSetErrors(ni->vol);
3123 } 3119 }
3124 return err; 3120 return err;
diff --git a/fs/ntfs/mft.c b/fs/ntfs/mft.c
index 7254391b0e50..eb3eb143a32c 100644
--- a/fs/ntfs/mft.c
+++ b/fs/ntfs/mft.c
@@ -651,10 +651,7 @@ err_out:
651 * fs/ntfs/aops.c::mark_ntfs_record_dirty(). 651 * fs/ntfs/aops.c::mark_ntfs_record_dirty().
652 * 652 *
653 * On success, clean the mft record and return 0. On error, leave the mft 653 * On success, clean the mft record and return 0. On error, leave the mft
654 * record dirty and return -errno. The caller should call make_bad_inode() on 654 * record dirty and return -errno.
655 * the base inode to ensure no more access happens to this inode. We do not do
656 * it here as the caller may want to finish writing other extent mft records
657 * first to minimize on-disk metadata inconsistencies.
658 * 655 *
659 * NOTE: We always perform synchronous i/o and ignore the @sync parameter. 656 * NOTE: We always perform synchronous i/o and ignore the @sync parameter.
660 * However, if the mft record has a counterpart in the mft mirror and @sync is 657 * However, if the mft record has a counterpart in the mft mirror and @sync is