Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma
[linux-2.6-microblaze.git] / fs / pstore / ram_core.c
index c917c19..fff363b 100644 (file)
@@ -246,7 +246,7 @@ static int persistent_ram_init_ecc(struct persistent_ram_zone *prz,
                pr_info("error in header, %d\n", numerr);
                prz->corrected_bytes += numerr;
        } else if (numerr < 0) {
-               pr_info("uncorrectable error in header\n");
+               pr_info_ratelimited("uncorrectable error in header\n");
                prz->bad_blocks++;
        }
 
@@ -283,7 +283,7 @@ static int notrace persistent_ram_update_user(struct persistent_ram_zone *prz,
        const void __user *s, unsigned int start, unsigned int count)
 {
        struct persistent_ram_buffer *buffer = prz->buffer;
-       int ret = unlikely(__copy_from_user(buffer->data + start, s, count)) ?
+       int ret = unlikely(copy_from_user(buffer->data + start, s, count)) ?
                -EFAULT : 0;
        persistent_ram_update_ecc(prz, start, count);
        return ret;
@@ -348,8 +348,6 @@ int notrace persistent_ram_write_user(struct persistent_ram_zone *prz,
        int rem, ret = 0, c = count;
        size_t start;
 
-       if (unlikely(!access_ok(s, count)))
-               return -EFAULT;
        if (unlikely(c > prz->buffer_size)) {
                s += c - prz->buffer_size;
                c = prz->buffer_size;