X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=fs%2Fntfs%2Finode.c;h=e9da092e27723a91d5c2bc9bd60a1645b494ca00;hb=c4888f9ffafe7db107b7eafb3a68eaeeff3779c3;hp=f8bf8da67ee8f86bb0813b231f55ddbfc5148a46;hpb=7e23772f414cdbfb2a08aed237d6e926bb1cb728;p=linux-2.6-omap-h63xx.git diff --git a/fs/ntfs/inode.c b/fs/ntfs/inode.c index f8bf8da67ee..e9da092e277 100644 --- a/fs/ntfs/inode.c +++ b/fs/ntfs/inode.c @@ -27,7 +27,6 @@ #include #include #include -#include #include "aops.h" #include "attrib.h" @@ -35,7 +34,6 @@ #include "dir.h" #include "debug.h" #include "inode.h" -#include "attrib.h" #include "lcnalloc.h" #include "malloc.h" #include "mft.h" @@ -141,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; } @@ -2501,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);