summaryrefslogtreecommitdiffstats
path: root/fs/hfs/file_hdr.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-01-04 16:03:48 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-01-04 16:03:48 +0000
commit78c388aed2b7184182c08428db1de6c872d815f5 (patch)
tree4b2003b1b4ceb241a17faa995da8dd1004bb8e45 /fs/hfs/file_hdr.c
parenteb7a5bf93aaa4be1d7c6181100ab7639e74d67f7 (diff)
Merge with Linux 2.1.131 and more MIPS goodies.
(Did I mention that CVS is buggy ...)
Diffstat (limited to 'fs/hfs/file_hdr.c')
-rw-r--r--fs/hfs/file_hdr.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/hfs/file_hdr.c b/fs/hfs/file_hdr.c
index b12a4606b..3ae2d5b5d 100644
--- a/fs/hfs/file_hdr.c
+++ b/fs/hfs/file_hdr.c
@@ -559,6 +559,7 @@ done:
if (read) {
inode->i_atime = CURRENT_TIME;
*ppos = pos;
+ mark_inode_dirty(inode);
}
return read;
}
@@ -610,7 +611,7 @@ static hfs_rwret_t hdr_write(struct file *filp, const char *buf,
left = count;
}
- copy_from_user(((char *)&meta) + pos, buf, left);
+ left -= copy_from_user(((char *)&meta) + pos, buf, left);
layout->magic = hfs_get_nl(meta.magic);
layout->version = hfs_get_nl(meta.version);
layout->entries = hfs_get_hs(meta.entries);
@@ -642,7 +643,7 @@ static hfs_rwret_t hdr_write(struct file *filp, const char *buf,
left = count;
}
- copy_from_user(((char *)&meta) + pos, buf, left);
+ left -= copy_from_user(((char *)&meta) + pos, buf, left);
init_layout(layout, meta.descrs);
count -= left;
@@ -782,7 +783,7 @@ static hfs_rwret_t hdr_write(struct file *filp, const char *buf,
/* transfer the data from user space */
if (p) {
- copy_from_user(p + offset, buf, left);
+ left -= copy_from_user(p + offset, buf, left);
} else if (fork) {
left = hfs_do_write(inode, fork, offset, buf, left);
}
@@ -874,6 +875,7 @@ done:
if (pos > inode->i_size)
inode->i_size = pos;
inode->i_mtime = inode->i_atime = CURRENT_TIME;
+ mark_inode_dirty(inode);
}
return written;
}
@@ -887,7 +889,6 @@ done:
*/
static void hdr_truncate(struct inode *inode)
{
- /*struct inode *inode = dentry->d_inode;*/
struct hfs_cat_entry *entry = HFS_I(inode)->entry;
struct hfs_hdr_layout *layout;
size_t size = inode->i_size;
@@ -936,7 +937,7 @@ static void hdr_truncate(struct inode *inode)
if (fork->lsize != descr->length) {
fork->lsize = descr->length;
hfs_extent_adj(fork);
- hfs_cat_mark_dirty(HFS_I(inode)->entry);
+ hfs_cat_mark_dirty(entry);
}
}
}