aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2006-06-20 16:36:38 -0400
committerSteve French <sfrench@us.ibm.com>2006-06-20 16:36:38 -0400
commit75ba632a01d4dc70d0a0f3a92b5ec9b4a3644b2d (patch)
treec2f02ee30609d0d69308b4ca80d68d02a5f85552 /fs
parent0fd1ffe0633b4b039b343b753598e6df435e034d (diff)
parent25f42b6af09e34c3f92107b36b5aa6edc2fdba2f (diff)
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'fs')
-rw-r--r--fs/bio.c5
-rw-r--r--fs/debugfs/inode.c3
-rw-r--r--fs/locks.c2
3 files changed, 7 insertions, 3 deletions
diff --git a/fs/bio.c b/fs/bio.c
index 098c12b2d60..6a0b9ad8f8c 100644
--- a/fs/bio.c
+++ b/fs/bio.c
@@ -654,9 +654,10 @@ static struct bio *__bio_map_user_iov(request_queue_t *q,
654 write_to_vm, 0, &pages[cur_page], NULL); 654 write_to_vm, 0, &pages[cur_page], NULL);
655 up_read(&current->mm->mmap_sem); 655 up_read(&current->mm->mmap_sem);
656 656
657 if (ret < local_nr_pages) 657 if (ret < local_nr_pages) {
658 ret = -EFAULT;
658 goto out_unmap; 659 goto out_unmap;
659 660 }
660 661
661 offset = uaddr & ~PAGE_MASK; 662 offset = uaddr & ~PAGE_MASK;
662 for (j = cur_page; j < page_limit; j++) { 663 for (j = cur_page; j < page_limit; j++) {
diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
index 85d166cdcae..b55b4ea9a67 100644
--- a/fs/debugfs/inode.c
+++ b/fs/debugfs/inode.c
@@ -67,12 +67,13 @@ static struct inode *debugfs_get_inode(struct super_block *sb, int mode, dev_t d
67static int debugfs_mknod(struct inode *dir, struct dentry *dentry, 67static int debugfs_mknod(struct inode *dir, struct dentry *dentry,
68 int mode, dev_t dev) 68 int mode, dev_t dev)
69{ 69{
70 struct inode *inode = debugfs_get_inode(dir->i_sb, mode, dev); 70 struct inode *inode;
71 int error = -EPERM; 71 int error = -EPERM;
72 72
73 if (dentry->d_inode) 73 if (dentry->d_inode)
74 return -EEXIST; 74 return -EEXIST;
75 75
76 inode = debugfs_get_inode(dir->i_sb, mode, dev);
76 if (inode) { 77 if (inode) {
77 d_instantiate(dentry, inode); 78 d_instantiate(dentry, inode);
78 dget(dentry); 79 dget(dentry);
diff --git a/fs/locks.c b/fs/locks.c
index 6f99c0a6f83..ab61a8b5482 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -755,6 +755,7 @@ static int flock_lock_file(struct file *filp, struct file_lock *request)
755 if (request->fl_type == F_UNLCK) 755 if (request->fl_type == F_UNLCK)
756 goto out; 756 goto out;
757 757
758 error = -ENOMEM;
758 new_fl = locks_alloc_lock(); 759 new_fl = locks_alloc_lock();
759 if (new_fl == NULL) 760 if (new_fl == NULL)
760 goto out; 761 goto out;
@@ -781,6 +782,7 @@ static int flock_lock_file(struct file *filp, struct file_lock *request)
781 locks_copy_lock(new_fl, request); 782 locks_copy_lock(new_fl, request);
782 locks_insert_lock(&inode->i_flock, new_fl); 783 locks_insert_lock(&inode->i_flock, new_fl);
783 new_fl = NULL; 784 new_fl = NULL;
785 error = 0;
784 786
785out: 787out:
786 unlock_kernel(); 788 unlock_kernel();