Merge tag 'for-linus-4.16' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap...
[linux-2.6-block.git] / fs / orangefs / super.c
index 62d49e53061ca0d23a6b03562e091667b14466b4..3ae5fdba0225b5670491b9cbfbf68be7bccf84a9 100644 (file)
@@ -335,7 +335,7 @@ static int orangefs_encode_fh(struct inode *inode,
        struct orangefs_object_kref refn;
 
        if (*max_len < len) {
-               gossip_lerr("fh buffer is too small for encoding\n");
+               gossip_err("fh buffer is too small for encoding\n");
                *max_len = len;
                type = 255;
                goto out;
@@ -383,7 +383,7 @@ static int orangefs_unmount(int id, __s32 fs_id, const char *devname)
        op->upcall.req.fs_umount.id = id;
        op->upcall.req.fs_umount.fs_id = fs_id;
        strncpy(op->upcall.req.fs_umount.orangefs_config_server,
-           devname, ORANGEFS_MAX_SERVER_ADDR_LEN);
+           devname, ORANGEFS_MAX_SERVER_ADDR_LEN - 1);
        r = service_operation(op, "orangefs_fs_umount", 0);
        /* Not much to do about an error here. */
        if (r)
@@ -478,7 +478,7 @@ struct dentry *orangefs_mount(struct file_system_type *fst,
 
        strncpy(new_op->upcall.req.fs_mount.orangefs_config_server,
                devname,
-               ORANGEFS_MAX_SERVER_ADDR_LEN);
+               ORANGEFS_MAX_SERVER_ADDR_LEN - 1);
 
        gossip_debug(GOSSIP_SUPER_DEBUG,
                     "Attempting ORANGEFS Mount via host %s\n",
@@ -520,7 +520,7 @@ struct dentry *orangefs_mount(struct file_system_type *fst,
         */
        strncpy(ORANGEFS_SB(sb)->devname,
                devname,
-               ORANGEFS_MAX_SERVER_ADDR_LEN);
+               ORANGEFS_MAX_SERVER_ADDR_LEN - 1);
 
        /* mount_pending must be cleared */
        ORANGEFS_SB(sb)->mount_pending = 0;