]> Pileus Git - ~andy/linux/blobdiff - net/rds/info.c
Merge branch 'for-linus' of git://repo.or.cz/cris-mirror
[~andy/linux] / net / rds / info.c
index 1d885535214dba2ba7567bed1b005e391fa9d675..814a91a6f4a79dd97422bded809a0e67778a4bd5 100644 (file)
@@ -79,6 +79,7 @@ void rds_info_register_func(int optname, rds_info_func func)
        rds_info_funcs[offset] = func;
        spin_unlock(&rds_info_lock);
 }
+EXPORT_SYMBOL_GPL(rds_info_register_func);
 
 void rds_info_deregister_func(int optname, rds_info_func func)
 {
@@ -91,6 +92,7 @@ void rds_info_deregister_func(int optname, rds_info_func func)
        rds_info_funcs[offset] = NULL;
        spin_unlock(&rds_info_lock);
 }
+EXPORT_SYMBOL_GPL(rds_info_deregister_func);
 
 /*
  * Typically we hold an atomic kmap across multiple rds_info_copy() calls
@@ -137,6 +139,7 @@ void rds_info_copy(struct rds_info_iterator *iter, void *data,
                }
        }
 }
+EXPORT_SYMBOL_GPL(rds_info_copy);
 
 /*
  * @optval points to the userspace buffer that the information snapshot
@@ -188,10 +191,7 @@ int rds_info_getsockopt(struct socket *sock, int optname, char __user *optval,
                ret = -ENOMEM;
                goto out;
        }
-       down_read(&current->mm->mmap_sem);
-       ret = get_user_pages(current, current->mm, start, nr_pages, 1, 0,
-                            pages, NULL);
-       up_read(&current->mm->mmap_sem);
+       ret = get_user_pages_fast(start, nr_pages, 1, pages);
        if (ret != nr_pages) {
                if (ret > 0)
                        nr_pages = ret;