summaryrefslogtreecommitdiffstats
path: root/fs/orangefs/inode.c
diff options
context:
space:
mode:
authorMike Marshall <hubcap@omnibond.com>2018-05-11 17:11:48 -0400
committerMike Marshall <hubcap@omnibond.com>2018-06-01 14:51:30 -0400
commit95f5f88f8900c09eb534c8cb42d75ff3cf7ea96c (patch)
tree3cf3541a5e8ff0f84d4ed67639e75f562fe45104 /fs/orangefs/inode.c
parentf6a4b4c9d07dda90c7c29dae96d6119ac6425dca (diff)
downloadlinux-95f5f88f8900c09eb534c8cb42d75ff3cf7ea96c.tar.gz
linux-95f5f88f8900c09eb534c8cb42d75ff3cf7ea96c.tar.bz2
linux-95f5f88f8900c09eb534c8cb42d75ff3cf7ea96c.zip
orangefs: formatting cleanups
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
Diffstat (limited to 'fs/orangefs/inode.c')
-rw-r--r--fs/orangefs/inode.c44
1 files changed, 26 insertions, 18 deletions
diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c
index f301e4957659..d6db252e6200 100644
--- a/fs/orangefs/inode.c
+++ b/fs/orangefs/inode.c
@@ -181,16 +181,15 @@ static int orangefs_setattr_size(struct inode *inode, struct iattr *iattr)
new_op->upcall.req.truncate.refn = orangefs_inode->refn;
new_op->upcall.req.truncate.size = (__s64) iattr->ia_size;
- ret = service_operation(new_op, __func__,
- get_interruptible_flag(inode));
+ ret = service_operation(new_op,
+ __func__,
+ get_interruptible_flag(inode));
/*
* the truncate has no downcall members to retrieve, but
* the status value tells us if it went through ok or not
*/
- gossip_debug(GOSSIP_INODE_DEBUG,
- "orangefs: orangefs_truncate got return value of %d\n",
- ret);
+ gossip_debug(GOSSIP_INODE_DEBUG, "%s: ret:%d:\n", __func__, ret);
op_release(new_op);
@@ -212,8 +211,9 @@ int orangefs_setattr(struct dentry *dentry, struct iattr *iattr)
struct inode *inode = dentry->d_inode;
gossip_debug(GOSSIP_INODE_DEBUG,
- "orangefs_setattr: called on %pd\n",
- dentry);
+ "%s: called on %pd\n",
+ __func__,
+ dentry);
ret = setattr_prepare(dentry, iattr);
if (ret)
@@ -230,15 +230,16 @@ int orangefs_setattr(struct dentry *dentry, struct iattr *iattr)
ret = orangefs_inode_setattr(inode, iattr);
gossip_debug(GOSSIP_INODE_DEBUG,
- "orangefs_setattr: inode_setattr returned %d\n",
- ret);
+ "%s: orangefs_inode_setattr returned %d\n",
+ __func__,
+ ret);
if (!ret && (iattr->ia_valid & ATTR_MODE))
/* change mod on a file that has ACLs */
ret = posix_acl_chmod(inode, inode->i_mode);
out:
- gossip_debug(GOSSIP_INODE_DEBUG, "orangefs_setattr: returning %d\n", ret);
+ gossip_debug(GOSSIP_INODE_DEBUG, "%s: ret:%d:\n", __func__, ret);
return ret;
}
@@ -312,7 +313,7 @@ int orangefs_update_time(struct inode *inode, struct timespec *time, int flags)
return orangefs_inode_setattr(inode, &iattr);
}
-/* ORANGEDS2 implementation of VFS inode operations for files */
+/* ORANGEFS2 implementation of VFS inode operations for files */
static const struct inode_operations orangefs_file_inode_operations = {
.get_acl = orangefs_get_acl,
.set_acl = orangefs_set_acl,
@@ -350,8 +351,8 @@ static int orangefs_init_iops(struct inode *inode)
}
/*
- * Given a ORANGEFS object identifier (fsid, handle), convert it into a ino_t type
- * that will be used as a hash-index from where the handle will
+ * Given an ORANGEFS object identifier (fsid, handle), convert it into
+ * a ino_t type that will be used as a hash-index from where the handle will
* be searched for in the VFS hash table of inodes.
*/
static inline ino_t orangefs_handle_hash(struct orangefs_object_kref *ref)
@@ -381,8 +382,10 @@ static int orangefs_test_inode(struct inode *inode, void *data)
struct orangefs_inode_s *orangefs_inode = NULL;
orangefs_inode = ORANGEFS_I(inode);
- return (!ORANGEFS_khandle_cmp(&(orangefs_inode->refn.khandle), &(ref->khandle))
- && orangefs_inode->refn.fs_id == ref->fs_id);
+ /* test handles and fs_ids... */
+ return (!ORANGEFS_khandle_cmp(&(orangefs_inode->refn.khandle),
+ &(ref->khandle)) &&
+ orangefs_inode->refn.fs_id == ref->fs_id);
}
/*
@@ -390,16 +393,21 @@ static int orangefs_test_inode(struct inode *inode, void *data)
* file handle.
*
* @sb: the file system super block instance.
- * @ref: The ORANGEFS object for which we are trying to locate an inode structure.
+ * @ref: The ORANGEFS object for which we are trying to locate an inode.
*/
-struct inode *orangefs_iget(struct super_block *sb, struct orangefs_object_kref *ref)
+struct inode *orangefs_iget(struct super_block *sb,
+ struct orangefs_object_kref *ref)
{
struct inode *inode = NULL;
unsigned long hash;
int error;
hash = orangefs_handle_hash(ref);
- inode = iget5_locked(sb, hash, orangefs_test_inode, orangefs_set_inode, ref);
+ inode = iget5_locked(sb,
+ hash,
+ orangefs_test_inode,
+ orangefs_set_inode,
+ ref);
if (!inode || !(inode->i_state & I_NEW))
return inode;