aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorNathan Scott <nathans@sgi.com>2006-06-20 14:56:23 +1000
committerNathan Scott <nathans@sgi.com>2006-06-20 14:56:23 +1000
commit98174e46974323e4941c72e46345f7277755e146 (patch)
treec4644c8f38a519cfb3929d1175fc7107eefe48b9 /fs
parentd8ce75324135ea7100124c1fff4ec5090a350607 (diff)
parent25f42b6af09e34c3f92107b36b5aa6edc2fdba2f (diff)
downloadkernel_samsung_smdk4412-98174e46974323e4941c72e46345f7277755e146.zip
kernel_samsung_smdk4412-98174e46974323e4941c72e46345f7277755e146.tar.gz
kernel_samsung_smdk4412-98174e46974323e4941c72e46345f7277755e146.tar.bz2
Merge HEAD from ../linux-2.6
Diffstat (limited to 'fs')
-rw-r--r--fs/bio.c5
-rw-r--r--fs/locks.c2
2 files changed, 5 insertions, 2 deletions
diff --git a/fs/bio.c b/fs/bio.c
index 098c12b..6a0b9ad 100644
--- a/fs/bio.c
+++ b/fs/bio.c
@@ -654,9 +654,10 @@ static struct bio *__bio_map_user_iov(request_queue_t *q,
write_to_vm, 0, &pages[cur_page], NULL);
up_read(&current->mm->mmap_sem);
- if (ret < local_nr_pages)
+ if (ret < local_nr_pages) {
+ ret = -EFAULT;
goto out_unmap;
-
+ }
offset = uaddr & ~PAGE_MASK;
for (j = cur_page; j < page_limit; j++) {
diff --git a/fs/locks.c b/fs/locks.c
index 6f99c0a..ab61a8b 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)
if (request->fl_type == F_UNLCK)
goto out;
+ error = -ENOMEM;
new_fl = locks_alloc_lock();
if (new_fl == NULL)
goto out;
@@ -781,6 +782,7 @@ static int flock_lock_file(struct file *filp, struct file_lock *request)
locks_copy_lock(new_fl, request);
locks_insert_lock(&inode->i_flock, new_fl);
new_fl = NULL;
+ error = 0;
out:
unlock_kernel();