aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-02-08 15:20:41 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2018-02-08 15:20:41 -0500
commita0f79386a4968b4925da6db2d1daffd0605a4402 (patch)
tree096fb4be74f080900bba38afefcc7de0148f34e3
parent81153336eb76b253ba7852f3f1de525bb98f8c4d (diff)
parent74e938c22705c7b80d4422e84eea927fc78e60a8 (diff)
Merge tag 'for-linus-4.16' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux
Pull orangefs updates from Mike Marshall: "Mostly cleanups, but three bug fixes: - don't pass garbage return codes back up the call chain (Mike Marshall) - fix stale inode test (Martin Brandenburg) - fix off-by-one errors (Xiongfeng Wang) Also add Martin as a reviewer in the Maintainers file" * tag 'for-linus-4.16' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux: orangefs: reverse sense of is-inode-stale test in d_revalidate orangefs: simplify orangefs_inode_is_stale Orangefs: don't propogate whacky error codes orangefs: use correct string length orangefs: make orangefs_make_bad_inode static orangefs: remove ORANGEFS_KERNEL_DEBUG orangefs: remove gossip_ldebug and gossip_lerr orangefs: make orangefs_client_debug_init static MAINTAINERS: update orangefs list and add myself as reviewer
-rw-r--r--MAINTAINERS3
-rw-r--r--fs/orangefs/dcache.c19
-rw-r--r--fs/orangefs/namei.c16
-rw-r--r--fs/orangefs/orangefs-debugfs.c4
-rw-r--r--fs/orangefs/orangefs-debugfs.h1
-rw-r--r--fs/orangefs/orangefs-kernel.h10
-rw-r--r--fs/orangefs/orangefs-utils.c93
-rw-r--r--fs/orangefs/protocol.h15
-rw-r--r--fs/orangefs/super.c8
9 files changed, 76 insertions, 93 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index 4c7a2fdc9b34..e6c26cb47d02 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -10331,7 +10331,8 @@ F: fs/ocfs2/
10331 10331
10332ORANGEFS FILESYSTEM 10332ORANGEFS FILESYSTEM
10333M: Mike Marshall <hubcap@omnibond.com> 10333M: Mike Marshall <hubcap@omnibond.com>
10334L: pvfs2-developers@beowulf-underground.org (subscribers-only) 10334R: Martin Brandenburg <martin@omnibond.com>
10335L: devel@lists.orangefs.org
10335T: git git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux.git 10336T: git git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux.git
10336S: Supported 10337S: Supported
10337F: fs/orangefs/ 10338F: fs/orangefs/
diff --git a/fs/orangefs/dcache.c b/fs/orangefs/dcache.c
index ae782df5c063..fe484cf93e5c 100644
--- a/fs/orangefs/dcache.c
+++ b/fs/orangefs/dcache.c
@@ -33,7 +33,7 @@ static int orangefs_revalidate_lookup(struct dentry *dentry)
33 new_op->upcall.req.lookup.parent_refn = parent->refn; 33 new_op->upcall.req.lookup.parent_refn = parent->refn;
34 strncpy(new_op->upcall.req.lookup.d_name, 34 strncpy(new_op->upcall.req.lookup.d_name,
35 dentry->d_name.name, 35 dentry->d_name.name,
36 ORANGEFS_NAME_MAX); 36 ORANGEFS_NAME_MAX - 1);
37 37
38 gossip_debug(GOSSIP_DCACHE_DEBUG, 38 gossip_debug(GOSSIP_DCACHE_DEBUG,
39 "%s:%s:%d interrupt flag [%d]\n", 39 "%s:%s:%d interrupt flag [%d]\n",
@@ -118,8 +118,12 @@ static int orangefs_d_revalidate(struct dentry *dentry, unsigned int flags)
118 return 0; 118 return 0;
119 119
120 /* We do not need to continue with negative dentries. */ 120 /* We do not need to continue with negative dentries. */
121 if (!dentry->d_inode) 121 if (!dentry->d_inode) {
122 goto out; 122 gossip_debug(GOSSIP_DCACHE_DEBUG,
123 "%s: negative dentry or positive dentry and inode valid.\n",
124 __func__);
125 return 1;
126 }
123 127
124 /* Now we must perform a getattr to validate the inode contents. */ 128 /* Now we must perform a getattr to validate the inode contents. */
125 129
@@ -129,14 +133,7 @@ static int orangefs_d_revalidate(struct dentry *dentry, unsigned int flags)
129 __FILE__, __func__, __LINE__); 133 __FILE__, __func__, __LINE__);
130 return 0; 134 return 0;
131 } 135 }
132 if (ret == 0) 136 return !ret;
133 return 0;
134
135out:
136 gossip_debug(GOSSIP_DCACHE_DEBUG,
137 "%s: negative dentry or positive dentry and inode valid.\n",
138 __func__);
139 return 1;
140} 137}
141 138
142const struct dentry_operations orangefs_dentry_operations = { 139const struct dentry_operations orangefs_dentry_operations = {
diff --git a/fs/orangefs/namei.c b/fs/orangefs/namei.c
index c98bba2dbc94..6e3134e6d98a 100644
--- a/fs/orangefs/namei.c
+++ b/fs/orangefs/namei.c
@@ -41,7 +41,7 @@ static int orangefs_create(struct inode *dir,
41 ORANGEFS_TYPE_METAFILE, mode); 41 ORANGEFS_TYPE_METAFILE, mode);
42 42
43 strncpy(new_op->upcall.req.create.d_name, 43 strncpy(new_op->upcall.req.create.d_name,
44 dentry->d_name.name, ORANGEFS_NAME_MAX); 44 dentry->d_name.name, ORANGEFS_NAME_MAX - 1);
45 45
46 ret = service_operation(new_op, __func__, get_interruptible_flag(dir)); 46 ret = service_operation(new_op, __func__, get_interruptible_flag(dir));
47 47
@@ -142,7 +142,7 @@ static struct dentry *orangefs_lookup(struct inode *dir, struct dentry *dentry,
142 new_op->upcall.req.lookup.parent_refn = parent->refn; 142 new_op->upcall.req.lookup.parent_refn = parent->refn;
143 143
144 strncpy(new_op->upcall.req.lookup.d_name, dentry->d_name.name, 144 strncpy(new_op->upcall.req.lookup.d_name, dentry->d_name.name,
145 ORANGEFS_NAME_MAX); 145 ORANGEFS_NAME_MAX - 1);
146 146
147 gossip_debug(GOSSIP_NAME_DEBUG, 147 gossip_debug(GOSSIP_NAME_DEBUG,
148 "%s: doing lookup on %s under %pU,%d\n", 148 "%s: doing lookup on %s under %pU,%d\n",
@@ -244,7 +244,7 @@ static int orangefs_unlink(struct inode *dir, struct dentry *dentry)
244 244
245 new_op->upcall.req.remove.parent_refn = parent->refn; 245 new_op->upcall.req.remove.parent_refn = parent->refn;
246 strncpy(new_op->upcall.req.remove.d_name, dentry->d_name.name, 246 strncpy(new_op->upcall.req.remove.d_name, dentry->d_name.name,
247 ORANGEFS_NAME_MAX); 247 ORANGEFS_NAME_MAX - 1);
248 248
249 ret = service_operation(new_op, "orangefs_unlink", 249 ret = service_operation(new_op, "orangefs_unlink",
250 get_interruptible_flag(inode)); 250 get_interruptible_flag(inode));
@@ -300,8 +300,8 @@ static int orangefs_symlink(struct inode *dir,
300 300
301 strncpy(new_op->upcall.req.sym.entry_name, 301 strncpy(new_op->upcall.req.sym.entry_name,
302 dentry->d_name.name, 302 dentry->d_name.name,
303 ORANGEFS_NAME_MAX); 303 ORANGEFS_NAME_MAX - 1);
304 strncpy(new_op->upcall.req.sym.target, symname, ORANGEFS_NAME_MAX); 304 strncpy(new_op->upcall.req.sym.target, symname, ORANGEFS_NAME_MAX - 1);
305 305
306 ret = service_operation(new_op, __func__, get_interruptible_flag(dir)); 306 ret = service_operation(new_op, __func__, get_interruptible_flag(dir));
307 307
@@ -372,7 +372,7 @@ static int orangefs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode
372 ORANGEFS_TYPE_DIRECTORY, mode); 372 ORANGEFS_TYPE_DIRECTORY, mode);
373 373
374 strncpy(new_op->upcall.req.mkdir.d_name, 374 strncpy(new_op->upcall.req.mkdir.d_name,
375 dentry->d_name.name, ORANGEFS_NAME_MAX); 375 dentry->d_name.name, ORANGEFS_NAME_MAX - 1);
376 376
377 ret = service_operation(new_op, __func__, get_interruptible_flag(dir)); 377 ret = service_operation(new_op, __func__, get_interruptible_flag(dir));
378 378
@@ -453,10 +453,10 @@ static int orangefs_rename(struct inode *old_dir,
453 453
454 strncpy(new_op->upcall.req.rename.d_old_name, 454 strncpy(new_op->upcall.req.rename.d_old_name,
455 old_dentry->d_name.name, 455 old_dentry->d_name.name,
456 ORANGEFS_NAME_MAX); 456 ORANGEFS_NAME_MAX - 1);
457 strncpy(new_op->upcall.req.rename.d_new_name, 457 strncpy(new_op->upcall.req.rename.d_new_name,
458 new_dentry->d_name.name, 458 new_dentry->d_name.name,
459 ORANGEFS_NAME_MAX); 459 ORANGEFS_NAME_MAX - 1);
460 460
461 ret = service_operation(new_op, 461 ret = service_operation(new_op,
462 "orangefs_rename", 462 "orangefs_rename",
diff --git a/fs/orangefs/orangefs-debugfs.c b/fs/orangefs/orangefs-debugfs.c
index 1c59dff530de..6e35f2f3c897 100644
--- a/fs/orangefs/orangefs-debugfs.c
+++ b/fs/orangefs/orangefs-debugfs.c
@@ -328,7 +328,7 @@ static int help_show(struct seq_file *m, void *v)
328/* 328/*
329 * initialize the client-debug file. 329 * initialize the client-debug file.
330 */ 330 */
331int orangefs_client_debug_init(void) 331static int orangefs_client_debug_init(void)
332{ 332{
333 333
334 int rc = -ENOMEM; 334 int rc = -ENOMEM;
@@ -1056,7 +1056,7 @@ int orangefs_debugfs_new_debug(void __user *arg)
1056 client_debug_string, 1056 client_debug_string,
1057 llu(mask_info.mask_value)); 1057 llu(mask_info.mask_value));
1058 } else { 1058 } else {
1059 gossip_lerr("Invalid mask type....\n"); 1059 gossip_err("Invalid mask type....\n");
1060 return -EINVAL; 1060 return -EINVAL;
1061 } 1061 }
1062 1062
diff --git a/fs/orangefs/orangefs-debugfs.h b/fs/orangefs/orangefs-debugfs.h
index b5fd9cd4960f..51147f9ce3d6 100644
--- a/fs/orangefs/orangefs-debugfs.h
+++ b/fs/orangefs/orangefs-debugfs.h
@@ -1,7 +1,6 @@
1/* SPDX-License-Identifier: GPL-2.0 */ 1/* SPDX-License-Identifier: GPL-2.0 */
2int orangefs_debugfs_init(int); 2int orangefs_debugfs_init(int);
3void orangefs_debugfs_cleanup(void); 3void orangefs_debugfs_cleanup(void);
4int orangefs_client_debug_init(void);
5int orangefs_prepare_debugfs_help_string(int); 4int orangefs_prepare_debugfs_help_string(int);
6int orangefs_debugfs_new_client_mask(void __user *); 5int orangefs_debugfs_new_client_mask(void __user *);
7int orangefs_debugfs_new_client_string(void __user *); 6int orangefs_debugfs_new_client_string(void __user *);
diff --git a/fs/orangefs/orangefs-kernel.h b/fs/orangefs/orangefs-kernel.h
index 2595453fe737..eebbaece85ef 100644
--- a/fs/orangefs/orangefs-kernel.h
+++ b/fs/orangefs/orangefs-kernel.h
@@ -56,11 +56,7 @@
56 56
57#include "orangefs-dev-proto.h" 57#include "orangefs-dev-proto.h"
58 58
59#ifdef ORANGEFS_KERNEL_DEBUG
60#define ORANGEFS_DEFAULT_OP_TIMEOUT_SECS 10
61#else
62#define ORANGEFS_DEFAULT_OP_TIMEOUT_SECS 20 59#define ORANGEFS_DEFAULT_OP_TIMEOUT_SECS 20
63#endif
64 60
65#define ORANGEFS_BUFMAP_WAIT_TIMEOUT_SECS 30 61#define ORANGEFS_BUFMAP_WAIT_TIMEOUT_SECS 30
66 62
@@ -104,11 +100,11 @@ enum orangefs_vfs_op_states {
104 * orangefs kernel memory related flags 100 * orangefs kernel memory related flags
105 */ 101 */
106 102
107#if ((defined ORANGEFS_KERNEL_DEBUG) && (defined CONFIG_DEBUG_SLAB)) 103#if (defined CONFIG_DEBUG_SLAB)
108#define ORANGEFS_CACHE_CREATE_FLAGS SLAB_RED_ZONE 104#define ORANGEFS_CACHE_CREATE_FLAGS SLAB_RED_ZONE
109#else 105#else
110#define ORANGEFS_CACHE_CREATE_FLAGS 0 106#define ORANGEFS_CACHE_CREATE_FLAGS 0
111#endif /* ((defined ORANGEFS_KERNEL_DEBUG) && (defined CONFIG_DEBUG_SLAB)) */ 107#endif
112 108
113extern int orangefs_init_acl(struct inode *inode, struct inode *dir); 109extern int orangefs_init_acl(struct inode *inode, struct inode *dir);
114extern const struct xattr_handler *orangefs_xattr_handlers[]; 110extern const struct xattr_handler *orangefs_xattr_handlers[];
@@ -471,8 +467,6 @@ int orangefs_inode_check_changed(struct inode *inode);
471 467
472int orangefs_inode_setattr(struct inode *inode, struct iattr *iattr); 468int orangefs_inode_setattr(struct inode *inode, struct iattr *iattr);
473 469
474void orangefs_make_bad_inode(struct inode *inode);
475
476int orangefs_unmount_sb(struct super_block *sb); 470int orangefs_unmount_sb(struct super_block *sb);
477 471
478bool orangefs_cancel_op_in_progress(struct orangefs_kernel_op_s *op); 472bool orangefs_cancel_op_in_progress(struct orangefs_kernel_op_s *op);
diff --git a/fs/orangefs/orangefs-utils.c b/fs/orangefs/orangefs-utils.c
index 97fe93129f38..ea6256d136d1 100644
--- a/fs/orangefs/orangefs-utils.c
+++ b/fs/orangefs/orangefs-utils.c
@@ -230,25 +230,42 @@ static int orangefs_inode_type(enum orangefs_ds_type objtype)
230 return -1; 230 return -1;
231} 231}
232 232
233static int orangefs_inode_is_stale(struct inode *inode, int new, 233static void orangefs_make_bad_inode(struct inode *inode)
234{
235 if (is_root_handle(inode)) {
236 /*
237 * if this occurs, the pvfs2-client-core was killed but we
238 * can't afford to lose the inode operations and such
239 * associated with the root handle in any case.
240 */
241 gossip_debug(GOSSIP_UTILS_DEBUG,
242 "*** NOT making bad root inode %pU\n",
243 get_khandle_from_ino(inode));
244 } else {
245 gossip_debug(GOSSIP_UTILS_DEBUG,
246 "*** making bad inode %pU\n",
247 get_khandle_from_ino(inode));
248 make_bad_inode(inode);
249 }
250}
251
252static int orangefs_inode_is_stale(struct inode *inode,
234 struct ORANGEFS_sys_attr_s *attrs, char *link_target) 253 struct ORANGEFS_sys_attr_s *attrs, char *link_target)
235{ 254{
236 struct orangefs_inode_s *orangefs_inode = ORANGEFS_I(inode); 255 struct orangefs_inode_s *orangefs_inode = ORANGEFS_I(inode);
237 int type = orangefs_inode_type(attrs->objtype); 256 int type = orangefs_inode_type(attrs->objtype);
238 if (!new) { 257 /*
239 /* 258 * If the inode type or symlink target have changed then this
240 * If the inode type or symlink target have changed then this 259 * inode is stale.
241 * inode is stale. 260 */
242 */ 261 if (type == -1 || !(inode->i_mode & type)) {
243 if (type == -1 || !(inode->i_mode & type)) { 262 orangefs_make_bad_inode(inode);
244 orangefs_make_bad_inode(inode); 263 return 1;
245 return 1; 264 }
246 } 265 if (type == S_IFLNK && strncmp(orangefs_inode->link_target,
247 if (type == S_IFLNK && strncmp(orangefs_inode->link_target, 266 link_target, ORANGEFS_NAME_MAX)) {
248 link_target, ORANGEFS_NAME_MAX)) { 267 orangefs_make_bad_inode(inode);
249 orangefs_make_bad_inode(inode); 268 return 1;
250 return 1;
251 }
252 } 269 }
253 return 0; 270 return 0;
254} 271}
@@ -294,16 +311,18 @@ int orangefs_inode_getattr(struct inode *inode, int new, int bypass,
294 if (ret != 0) 311 if (ret != 0)
295 goto out; 312 goto out;
296 313
297 type = orangefs_inode_type(new_op-> 314 if (!new) {
298 downcall.resp.getattr.attributes.objtype); 315 ret = orangefs_inode_is_stale(inode,
299 ret = orangefs_inode_is_stale(inode, new, 316 &new_op->downcall.resp.getattr.attributes,
300 &new_op->downcall.resp.getattr.attributes, 317 new_op->downcall.resp.getattr.link_target);
301 new_op->downcall.resp.getattr.link_target); 318 if (ret) {
302 if (ret) { 319 ret = -ESTALE;
303 ret = -ESTALE; 320 goto out;
304 goto out; 321 }
305 } 322 }
306 323
324 type = orangefs_inode_type(new_op->
325 downcall.resp.getattr.attributes.objtype);
307 switch (type) { 326 switch (type) {
308 case S_IFREG: 327 case S_IFREG:
309 inode->i_flags = orangefs_inode_flags(&new_op-> 328 inode->i_flags = orangefs_inode_flags(&new_op->
@@ -348,6 +367,12 @@ int orangefs_inode_getattr(struct inode *inode, int new, int bypass,
348 inode->i_link = orangefs_inode->link_target; 367 inode->i_link = orangefs_inode->link_target;
349 } 368 }
350 break; 369 break;
370 /* i.e. -1 */
371 default:
372 /* XXX: ESTALE? This is what is done if it is not new. */
373 orangefs_make_bad_inode(inode);
374 ret = -ESTALE;
375 goto out;
351 } 376 }
352 377
353 inode->i_uid = make_kuid(&init_user_ns, new_op-> 378 inode->i_uid = make_kuid(&init_user_ns, new_op->
@@ -401,7 +426,7 @@ int orangefs_inode_check_changed(struct inode *inode)
401 if (ret != 0) 426 if (ret != 0)
402 goto out; 427 goto out;
403 428
404 ret = orangefs_inode_is_stale(inode, 0, 429 ret = orangefs_inode_is_stale(inode,
405 &new_op->downcall.resp.getattr.attributes, 430 &new_op->downcall.resp.getattr.attributes,
406 new_op->downcall.resp.getattr.link_target); 431 new_op->downcall.resp.getattr.link_target);
407out: 432out:
@@ -444,25 +469,6 @@ int orangefs_inode_setattr(struct inode *inode, struct iattr *iattr)
444 return ret; 469 return ret;
445} 470}
446 471
447void orangefs_make_bad_inode(struct inode *inode)
448{
449 if (is_root_handle(inode)) {
450 /*
451 * if this occurs, the pvfs2-client-core was killed but we
452 * can't afford to lose the inode operations and such
453 * associated with the root handle in any case.
454 */
455 gossip_debug(GOSSIP_UTILS_DEBUG,
456 "*** NOT making bad root inode %pU\n",
457 get_khandle_from_ino(inode));
458 } else {
459 gossip_debug(GOSSIP_UTILS_DEBUG,
460 "*** making bad inode %pU\n",
461 get_khandle_from_ino(inode));
462 make_bad_inode(inode);
463 }
464}
465
466/* 472/*
467 * The following is a very dirty hack that is now a permanent part of the 473 * The following is a very dirty hack that is now a permanent part of the
468 * ORANGEFS protocol. See protocol.h for more error definitions. 474 * ORANGEFS protocol. See protocol.h for more error definitions.
@@ -537,6 +543,7 @@ int orangefs_normalize_to_errno(__s32 error_code)
537 */ 543 */
538 } else { 544 } else {
539 gossip_err("orangefs: orangefs_normalize_to_errno: got error code which is not from ORANGEFS.\n"); 545 gossip_err("orangefs: orangefs_normalize_to_errno: got error code which is not from ORANGEFS.\n");
546 error_code = -EINVAL;
540 } 547 }
541 return error_code; 548 return error_code;
542} 549}
diff --git a/fs/orangefs/protocol.h b/fs/orangefs/protocol.h
index e0bf5e4dce0d..dc6e3e6269c3 100644
--- a/fs/orangefs/protocol.h
+++ b/fs/orangefs/protocol.h
@@ -395,13 +395,6 @@ struct ORANGEFS_dev_map_desc {
395 395
396/* gossip.h *****************************************************************/ 396/* gossip.h *****************************************************************/
397 397
398#ifdef GOSSIP_DISABLE_DEBUG
399#define gossip_debug(mask, fmt, ...) \
400do { \
401 if (0) \
402 printk(KERN_DEBUG fmt, ##__VA_ARGS__); \
403} while (0)
404#else
405extern __u64 orangefs_gossip_debug_mask; 398extern __u64 orangefs_gossip_debug_mask;
406 399
407/* try to avoid function call overhead by checking masks in macro */ 400/* try to avoid function call overhead by checking masks in macro */
@@ -410,13 +403,5 @@ do { \
410 if (orangefs_gossip_debug_mask & (mask)) \ 403 if (orangefs_gossip_debug_mask & (mask)) \
411 printk(KERN_DEBUG fmt, ##__VA_ARGS__); \ 404 printk(KERN_DEBUG fmt, ##__VA_ARGS__); \
412} while (0) 405} while (0)
413#endif /* GOSSIP_DISABLE_DEBUG */
414
415/* do file and line number printouts w/ the GNU preprocessor */
416#define gossip_ldebug(mask, fmt, ...) \
417 gossip_debug(mask, "%s: " fmt, __func__, ##__VA_ARGS__)
418 406
419#define gossip_err pr_err 407#define gossip_err pr_err
420#define gossip_lerr(fmt, ...) \
421 gossip_err("%s line %d: " fmt, \
422 __FILE__, __LINE__, ##__VA_ARGS__)
diff --git a/fs/orangefs/super.c b/fs/orangefs/super.c
index 62d49e53061c..3ae5fdba0225 100644
--- a/fs/orangefs/super.c
+++ b/fs/orangefs/super.c
@@ -335,7 +335,7 @@ static int orangefs_encode_fh(struct inode *inode,
335 struct orangefs_object_kref refn; 335 struct orangefs_object_kref refn;
336 336
337 if (*max_len < len) { 337 if (*max_len < len) {
338 gossip_lerr("fh buffer is too small for encoding\n"); 338 gossip_err("fh buffer is too small for encoding\n");
339 *max_len = len; 339 *max_len = len;
340 type = 255; 340 type = 255;
341 goto out; 341 goto out;
@@ -383,7 +383,7 @@ static int orangefs_unmount(int id, __s32 fs_id, const char *devname)
383 op->upcall.req.fs_umount.id = id; 383 op->upcall.req.fs_umount.id = id;
384 op->upcall.req.fs_umount.fs_id = fs_id; 384 op->upcall.req.fs_umount.fs_id = fs_id;
385 strncpy(op->upcall.req.fs_umount.orangefs_config_server, 385 strncpy(op->upcall.req.fs_umount.orangefs_config_server,
386 devname, ORANGEFS_MAX_SERVER_ADDR_LEN); 386 devname, ORANGEFS_MAX_SERVER_ADDR_LEN - 1);
387 r = service_operation(op, "orangefs_fs_umount", 0); 387 r = service_operation(op, "orangefs_fs_umount", 0);
388 /* Not much to do about an error here. */ 388 /* Not much to do about an error here. */
389 if (r) 389 if (r)
@@ -478,7 +478,7 @@ struct dentry *orangefs_mount(struct file_system_type *fst,
478 478
479 strncpy(new_op->upcall.req.fs_mount.orangefs_config_server, 479 strncpy(new_op->upcall.req.fs_mount.orangefs_config_server,
480 devname, 480 devname,
481 ORANGEFS_MAX_SERVER_ADDR_LEN); 481 ORANGEFS_MAX_SERVER_ADDR_LEN - 1);
482 482
483 gossip_debug(GOSSIP_SUPER_DEBUG, 483 gossip_debug(GOSSIP_SUPER_DEBUG,
484 "Attempting ORANGEFS Mount via host %s\n", 484 "Attempting ORANGEFS Mount via host %s\n",
@@ -520,7 +520,7 @@ struct dentry *orangefs_mount(struct file_system_type *fst,
520 */ 520 */
521 strncpy(ORANGEFS_SB(sb)->devname, 521 strncpy(ORANGEFS_SB(sb)->devname,
522 devname, 522 devname,
523 ORANGEFS_MAX_SERVER_ADDR_LEN); 523 ORANGEFS_MAX_SERVER_ADDR_LEN - 1);
524 524
525 /* mount_pending must be cleared */ 525 /* mount_pending must be cleared */
526 ORANGEFS_SB(sb)->mount_pending = 0; 526 ORANGEFS_SB(sb)->mount_pending = 0;