diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-06-20 14:59:45 +0200 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-06-20 14:59:45 +0200 |
commit | d59bf96cdde5b874a57bfd1425faa45da915d0b7 (patch) | |
tree | 351a40b72514d620e5bebea2de38c26f23277ffc /fs | |
parent | NLM: Fix reclaim races (diff) | |
parent | Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus (diff) | |
download | linux-d59bf96cdde5b874a57bfd1425faa45da915d0b7.tar.xz linux-d59bf96cdde5b874a57bfd1425faa45da915d0b7.zip |
Merge branch 'master' of /home/trondmy/kernel/linux-2.6/
Diffstat (limited to 'fs')
-rw-r--r-- | fs/bio.c | 5 | ||||
-rw-r--r-- | fs/locks.c | 2 |
2 files changed, 5 insertions, 2 deletions
@@ -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(¤t->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 6f99c0a6f836..ab61a8b54829 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(); |