summaryrefslogtreecommitdiffstats
path: root/fs/sysv
diff options
context:
space:
mode:
Diffstat (limited to 'fs/sysv')
-rw-r--r--fs/sysv/dir.c6
-rw-r--r--fs/sysv/ialloc.c2
-rw-r--r--fs/sysv/truncate.c9
3 files changed, 8 insertions, 9 deletions
diff --git a/fs/sysv/dir.c b/fs/sysv/dir.c
index 3dd0931cf..ac0bd2923 100644
--- a/fs/sysv/dir.c
+++ b/fs/sysv/dir.c
@@ -27,7 +27,7 @@ static long sysv_dir_read(struct inode * inode, struct file * filp,
return -EISDIR;
}
-static int sysv_readdir(struct inode *, struct file *, void *, filldir_t);
+static int sysv_readdir(struct file *, void *, filldir_t);
static struct file_operations sysv_dir_operations = {
NULL, /* lseek - default */
@@ -65,9 +65,9 @@ struct inode_operations sysv_dir_inode_operations = {
NULL /* permission */
};
-static int sysv_readdir(struct inode * inode, struct file * filp,
- void * dirent, filldir_t filldir)
+static int sysv_readdir(struct file * filp, void * dirent, filldir_t filldir)
{
+ struct inode *inode = filp->f_dentry->d_inode;
struct super_block * sb;
unsigned int offset,i;
struct buffer_head * bh;
diff --git a/fs/sysv/ialloc.c b/fs/sysv/ialloc.c
index fa0b3cf95..120c71ad1 100644
--- a/fs/sysv/ialloc.c
+++ b/fs/sysv/ialloc.c
@@ -154,12 +154,12 @@ struct inode * sysv_new_inode(const struct inode * dir)
inode->i_dev = sb->s_dev;
inode->i_uid = current->fsuid;
inode->i_gid = (dir->i_mode & S_ISGID) ? dir->i_gid : current->fsgid;
- mark_inode_dirty(inode);
inode->i_ino = ino;
inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
inode->i_op = NULL;
inode->i_blocks = inode->i_blksize = 0;
insert_inode_hash(inode);
+ mark_inode_dirty(inode);
/* Change directory entry: */
inode->i_mode = 0; /* for sysv_write_inode() */
inode->i_size = 0; /* ditto */
diff --git a/fs/sysv/truncate.c b/fs/sysv/truncate.c
index 433c39cae..9130672d0 100644
--- a/fs/sysv/truncate.c
+++ b/fs/sysv/truncate.c
@@ -257,14 +257,13 @@ done:
static int trunc_all(struct inode * inode)
{
struct super_block * sb;
- char * res;
+ char dirty;
sb = inode->i_sb;
- res = (char *)test_bit(I_DIRTY,&inode->i_state);
return trunc_direct(inode)
- | trunc_indirect(inode,sb->sv_ind0_size,&inode->u.sysv_i.i_data[10],0,res)
- | trunc_dindirect(inode,sb->sv_ind1_size,&inode->u.sysv_i.i_data[11],0,res)
- | trunc_tindirect(inode,sb->sv_ind2_size,&inode->u.sysv_i.i_data[12],0,res);
+ | trunc_indirect(inode,sb->sv_ind0_size,&inode->u.sysv_i.i_data[10],0,&dirty)
+ | trunc_dindirect(inode,sb->sv_ind1_size,&inode->u.sysv_i.i_data[11],0,&dirty)
+ | trunc_tindirect(inode,sb->sv_ind2_size,&inode->u.sysv_i.i_data[12],0,&dirty);
}