aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Brandenburg <martin@omnibond.com>2018-01-26 14:07:14 -0500
committerMike Marshall <hubcap@omnibond.com>2018-02-06 16:38:12 -0500
commit4d0cac7e752cccb9eb30cd0f22438b9506ed51bc (patch)
tree04e2bf612989aee519fcab6ae359f64280c7853d
parent538e30482155dbaaa53495ed37b889e9c2577cb9 (diff)
orangefs: make orangefs_make_bad_inode static
Signed-off-by: Martin Brandenburg <martin@omnibond.com> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
-rw-r--r--fs/orangefs/orangefs-kernel.h2
-rw-r--r--fs/orangefs/orangefs-utils.c38
2 files changed, 19 insertions, 21 deletions
diff --git a/fs/orangefs/orangefs-kernel.h b/fs/orangefs/orangefs-kernel.h
index 25bacc334d91..eebbaece85ef 100644
--- a/fs/orangefs/orangefs-kernel.h
+++ b/fs/orangefs/orangefs-kernel.h
@@ -467,8 +467,6 @@ int orangefs_inode_check_changed(struct inode *inode);
467 467
468int orangefs_inode_setattr(struct inode *inode, struct iattr *iattr); 468int orangefs_inode_setattr(struct inode *inode, struct iattr *iattr);
469 469
470void orangefs_make_bad_inode(struct inode *inode);
471
472int orangefs_unmount_sb(struct super_block *sb); 470int orangefs_unmount_sb(struct super_block *sb);
473 471
474bool 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..3098c2ee7b5f 100644
--- a/fs/orangefs/orangefs-utils.c
+++ b/fs/orangefs/orangefs-utils.c
@@ -230,6 +230,25 @@ static int orangefs_inode_type(enum orangefs_ds_type objtype)
230 return -1; 230 return -1;
231} 231}
232 232
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
233static int orangefs_inode_is_stale(struct inode *inode, int new, 252static int orangefs_inode_is_stale(struct inode *inode, int new,
234 struct ORANGEFS_sys_attr_s *attrs, char *link_target) 253 struct ORANGEFS_sys_attr_s *attrs, char *link_target)
235{ 254{
@@ -444,25 +463,6 @@ int orangefs_inode_setattr(struct inode *inode, struct iattr *iattr)
444 return ret; 463 return ret;
445} 464}
446 465
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/* 466/*
467 * The following is a very dirty hack that is now a permanent part of the 467 * 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. 468 * ORANGEFS protocol. See protocol.h for more error definitions.