diff options
Diffstat (limited to 'fs/ntfs')
-rw-r--r-- | fs/ntfs/fs.c | 8 | ||||
-rw-r--r-- | fs/ntfs/inode.c | 6 | ||||
-rw-r--r-- | fs/ntfs/super.c | 2 |
3 files changed, 6 insertions, 10 deletions
diff --git a/fs/ntfs/fs.c b/fs/ntfs/fs.c index f9ffb0a40..49d2160a6 100644 --- a/fs/ntfs/fs.c +++ b/fs/ntfs/fs.c @@ -428,7 +428,7 @@ ntfs_create(struct inode* dir,struct dentry *d,int mode) int error=0; ntfs_attribute *si; - r=get_empty_inode(); + r=new_inode(dir->i_sb); if(!r){ error=ENOMEM; goto fail; @@ -456,8 +456,6 @@ ntfs_create(struct inode* dir,struct dentry *d,int mode) r->i_uid=vol->uid; r->i_gid=vol->gid; - r->i_nlink=1; - r->i_sb=dir->i_sb; /* FIXME: dirty? dev? */ /* get the file modification times from the standard information */ si=ntfs_find_attr(ino,vol->at_standard_information,NULL); @@ -502,7 +500,7 @@ _linux_ntfs_mkdir(struct inode *dir, struct dentry* d, int mode) goto out; error = EIO; - r = get_empty_inode(); + r = new_inode(dir->i_sb); if (!r) goto out; @@ -522,8 +520,6 @@ _linux_ntfs_mkdir(struct inode *dir, struct dentry* d, int mode) goto out; r->i_uid = vol->uid; r->i_gid = vol->gid; - r->i_nlink = 1; - r->i_sb = dir->i_sb; si = ntfs_find_attr(ino,vol->at_standard_information,NULL); if(si){ char *attr = si->d.data; diff --git a/fs/ntfs/inode.c b/fs/ntfs/inode.c index 910ffe095..3fdc84ed1 100644 --- a/fs/ntfs/inode.c +++ b/fs/ntfs/inode.c @@ -1050,7 +1050,7 @@ ntfs_clear_bit (unsigned char *byte, int bit) /* We have to skip the 16 metafiles and the 8 reserved entries */ static int -new_inode (ntfs_volume* vol,int* result) +ntfs_new_inode (ntfs_volume* vol,int* result) { int byte,error; int bit; @@ -1236,11 +1236,11 @@ int ntfs_alloc_inode (ntfs_inode *dir, ntfs_inode *result, ntfs_volume* vol=dir->vol; int byte,bit; - error=new_inode (vol,&(result->i_number)); + error=ntfs_new_inode (vol,&(result->i_number)); if(error==ENOSPC){ error=ntfs_extend_mft(vol); if(error)return error; - error=new_inode(vol,&(result->i_number)); + error=ntfs_new_inode(vol,&(result->i_number)); } if(error){ ntfs_error ("ntfs_get_empty_inode: no free inodes\n"); diff --git a/fs/ntfs/super.c b/fs/ntfs/super.c index 3b7b5b2af..1e6f1c854 100644 --- a/fs/ntfs/super.c +++ b/fs/ntfs/super.c @@ -125,7 +125,7 @@ ntfs_init_upcase(ntfs_inode *upcase) io.param=(char*)upcase->vol->upcase; io.size=2*UPCASE_LENGTH; ntfs_read_attr(upcase,upcase->vol->at_data,0,0,&io); - upcase->vol->upcase_length = io.size; + upcase->vol->upcase_length = io.size / 2; } static int |