VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: James Morris <jmorris@namei.org> 2011-03-08 10:55:06 +1100 committer: James Morris <jmorris@namei.org> 2011-03-08 10:55:06 +1100 commit: 1cc26bada9f6807814806db2f0d78792eecdac71 parent: eae61f3c829439f8f9121b5cd48a14be04df451f
Commit Summary:
Merge branch 'master'; commit 'v2.6.38-rc7' into next
Diffstat:
1 file changed, 2 insertions, 2 deletions
diff --git a/fs/file_table.c b/fs/file_table.c
index 0c724deb46f9..cbeec70ee310 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -125,13 +125,13 @@ struct file *get_empty_filp(void)
 		goto fail;
 
 	percpu_counter_inc(&nr_files);
+	f->f_cred = get_cred(cred);
 	if (security_file_alloc(f))
 		goto fail_sec;
 
 	INIT_LIST_HEAD(&f->f_u.fu_list);
 	atomic_long_set(&f->f_count, 1);
 	rwlock_init(&f->f_owner.lock);
-	f->f_cred = get_cred(cred);
 	spin_lock_init(&f->f_lock);
 	eventpoll_init_file(f);
 	/* f->f_version: 0 */
@@ -314,7 +314,7 @@ struct file *fget_light(unsigned int fd, int *fput_needed)
 	struct files_struct *files = current->files;
 
 	*fput_needed = 0;
-	if (likely((atomic_read(&files->count) == 1))) {
+	if (atomic_read(&files->count) == 1) {
 		file = fcheck_files(files, fd);
 	} else {
 		rcu_read_lock();