Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[sfrench/cifs-2.6.git] / fs / btrfs / ioctl.c
index be5bd81b3669c9bda5bc5b38ba0c9dafb71bc883..111ee282b7772a85c46dd4cf746c59cf313803cd 100644 (file)
@@ -43,6 +43,7 @@
 #include <linux/uuid.h>
 #include <linux/btrfs.h>
 #include <linux/uaccess.h>
+#include <linux/iversion.h>
 #include "ctree.h"
 #include "disk-io.h"
 #include "transaction.h"
@@ -977,7 +978,7 @@ static struct extent_map *defrag_lookup_extent(struct inode *inode, u64 start)
                /* get the big lock and read metadata off disk */
                lock_extent_bits(io_tree, start, end, &cached);
                em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, start, len, 0);
-               unlock_extent_cached(io_tree, start, end, &cached, GFP_NOFS);
+               unlock_extent_cached(io_tree, start, end, &cached);
 
                if (IS_ERR(em))
                        return NULL;
@@ -1128,7 +1129,7 @@ again:
                        ordered = btrfs_lookup_ordered_extent(inode,
                                                              page_start);
                        unlock_extent_cached(tree, page_start, page_end,
-                                            &cached_state, GFP_NOFS);
+                                            &cached_state);
                        if (!ordered)
                                break;
 
@@ -1204,8 +1205,7 @@ again:
                          &cached_state);
 
        unlock_extent_cached(&BTRFS_I(inode)->io_tree,
-                            page_start, page_end - 1, &cached_state,
-                            GFP_NOFS);
+                            page_start, page_end - 1, &cached_state);
 
        for (i = 0; i < i_done; i++) {
                clear_page_dirty_for_io(pages[i]);
@@ -2799,7 +2799,7 @@ static long btrfs_ioctl_dev_info(struct btrfs_fs_info *fs_info,
                struct rcu_string *name;
 
                name = rcu_dereference(dev->name);
-               strncpy(di_args->path, name->str, sizeof(di_args->path));
+               strncpy(di_args->path, name->str, sizeof(di_args->path) - 1);
                di_args->path[sizeof(di_args->path) - 1] = 0;
        } else {
                di_args->path[0] = '\0';