]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/ntfs/inode.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
[linux-2.6-omap-h63xx.git] / fs / ntfs / inode.c
index 074791ce4ab27fda0ae007f491662ac5ec95b2a7..e9da092e27723a91d5c2bc9bd60a1645b494ca00 100644 (file)
@@ -34,7 +34,6 @@
 #include "dir.h"
 #include "debug.h"
 #include "inode.h"
-#include "attrib.h"
 #include "lcnalloc.h"
 #include "malloc.h"
 #include "mft.h"
@@ -140,7 +139,7 @@ static int ntfs_init_locked_inode(struct inode *vi, ntfs_attr *na)
                if (!ni->name)
                        return -ENOMEM;
                memcpy(ni->name, na->name, i);
-               ni->name[i] = 0;
+               ni->name[na->name_len] = 0;
        }
        return 0;
 }
@@ -2500,8 +2499,6 @@ retry_truncate:
        /* Resize the attribute record to best fit the new attribute size. */
        if (new_size < vol->mft_record_size &&
                        !ntfs_resident_attr_value_resize(m, a, new_size)) {
-               unsigned long flags;
-
                /* The resize succeeded! */
                flush_dcache_mft_record_page(ctx->ntfs_ino);
                mark_mft_record_dirty(ctx->ntfs_ino);