Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 21052
b: refs/heads/master
c: 17320a9
h: refs/heads/master
v: v3
  • Loading branch information
Russell King authored and Russell King committed Mar 15, 2006
1 parent 9197db8 commit 6bee1d3
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2d7f2ea9c989853310c7f6e8be52cc090cc8e66b
refs/heads/master: 17320a9644a45ccac51ce4ff4333276844abf72d
2 changes: 1 addition & 1 deletion trunk/arch/arm/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ static int ptrace_setwmmxregs(struct task_struct *tsk, void __user *ufp)
if (!test_ti_thread_flag(thread, TIF_USING_IWMMXT))
return -EACCES;
iwmmxt_task_release(thread); /* force a reload */
return copy_from_user(&thead->fpstate.iwmmxt, ufp, IWMMXT_SIZE)
return copy_from_user(&thread->fpstate.iwmmxt, ufp, IWMMXT_SIZE)
? -EFAULT : 0;
}

Expand Down
28 changes: 16 additions & 12 deletions trunk/fs/ext2/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,11 @@ ext2_readdir (struct file * filp, void * dirent, filldir_t filldir)
unsigned long npages = dir_pages(inode);
unsigned chunk_mask = ~(ext2_chunk_size(inode)-1);
unsigned char *types = NULL;
int need_revalidate = filp->f_version != inode->i_version;
int need_revalidate = (filp->f_version != inode->i_version);
int ret;

if (pos > inode->i_size - EXT2_DIR_REC_LEN(1))
return 0;
goto success;

if (EXT2_HAS_INCOMPAT_FEATURE(sb, EXT2_FEATURE_INCOMPAT_FILETYPE))
types = ext2_filetype_table;
Expand All @@ -274,15 +275,12 @@ ext2_readdir (struct file * filp, void * dirent, filldir_t filldir)
"bad page in #%lu",
inode->i_ino);
filp->f_pos += PAGE_CACHE_SIZE - offset;
return -EIO;
ret = -EIO;
goto done;
}
kaddr = page_address(page);
if (unlikely(need_revalidate)) {
if (offset) {
offset = ext2_validate_entry(kaddr, offset, chunk_mask);
filp->f_pos = (n<<PAGE_CACHE_SHIFT) + offset;
}
filp->f_version = inode->i_version;
if (need_revalidate) {
offset = ext2_validate_entry(kaddr, offset, chunk_mask);
need_revalidate = 0;
}
de = (ext2_dirent *)(kaddr+offset);
Expand All @@ -291,8 +289,9 @@ ext2_readdir (struct file * filp, void * dirent, filldir_t filldir)
if (de->rec_len == 0) {
ext2_error(sb, __FUNCTION__,
"zero-length directory entry");
ret = -EIO;
ext2_put_page(page);
return -EIO;
goto done;
}
if (de->inode) {
int over;
Expand All @@ -307,14 +306,19 @@ ext2_readdir (struct file * filp, void * dirent, filldir_t filldir)
le32_to_cpu(de->inode), d_type);
if (over) {
ext2_put_page(page);
return 0;
goto success;
}
}
filp->f_pos += le16_to_cpu(de->rec_len);
}
ext2_put_page(page);
}
return 0;

success:
ret = 0;
done:
filp->f_version = inode->i_version;
return ret;
}

/*
Expand Down
5 changes: 3 additions & 2 deletions trunk/fs/namespace.c
Original file line number Diff line number Diff line change
Expand Up @@ -1338,7 +1338,7 @@ struct namespace *dup_namespace(struct task_struct *tsk, struct fs_struct *fs)

new_ns = kmalloc(sizeof(struct namespace), GFP_KERNEL);
if (!new_ns)
return NULL;
goto out;

atomic_set(&new_ns->count, 1);
INIT_LIST_HEAD(&new_ns->list);
Expand All @@ -1352,7 +1352,7 @@ struct namespace *dup_namespace(struct task_struct *tsk, struct fs_struct *fs)
if (!new_ns->root) {
up_write(&namespace_sem);
kfree(new_ns);
return NULL;
goto out;
}
spin_lock(&vfsmount_lock);
list_add_tail(&new_ns->list, &new_ns->root->mnt_list);
Expand Down Expand Up @@ -1393,6 +1393,7 @@ struct namespace *dup_namespace(struct task_struct *tsk, struct fs_struct *fs)
if (altrootmnt)
mntput(altrootmnt);

out:
return new_ns;
}

Expand Down

0 comments on commit 6bee1d3

Please sign in to comment.