summaryrefslogtreecommitdiffstats
path: root/module/zfs/zpl_ctldir.c
diff options
context:
space:
mode:
authorMichael Kjorling <[email protected]>2013-11-01 20:26:11 +0100
committerBrian Behlendorf <[email protected]>2013-12-18 16:46:35 -0800
commitd1d7e2689db9e03f11c069ebc9f1ba12829e5dac (patch)
tree75b9a2b23334d5f673fb31f142f74146d351865c /module/zfs/zpl_ctldir.c
parent8ffef572ed2ba97e0c2d6a8aa2240012e611dc6f (diff)
cstyle: Resolve C style issues
The vast majority of these changes are in Linux specific code. They are the result of not having an automated style checker to validate the code when it was originally written. Others were caused when the common code was slightly adjusted for Linux. This patch contains no functional changes. It only refreshes the code to conform to style guide. Everyone submitting patches for inclusion upstream should now run 'make checkstyle' and resolve any warning prior to opening a pull request. The automated builders have been updated to fail a build if when 'make checkstyle' detects an issue. Signed-off-by: Brian Behlendorf <[email protected]> Closes #1821
Diffstat (limited to 'module/zfs/zpl_ctldir.c')
-rw-r--r--module/zfs/zpl_ctldir.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/module/zfs/zpl_ctldir.c b/module/zfs/zpl_ctldir.c
index 8afe8bfdb..9e587e3f0 100644
--- a/module/zfs/zpl_ctldir.c
+++ b/module/zfs/zpl_ctldir.c
@@ -43,7 +43,7 @@ zpl_common_open(struct inode *ip, struct file *filp)
if (filp->f_mode & FMODE_WRITE)
return (-EACCES);
- return generic_file_open(ip, filp);
+ return (generic_file_open(ip, filp));
}
/*
@@ -129,12 +129,12 @@ zpl_root_lookup(struct inode *dip, struct dentry *dentry, unsigned int flags)
if (error) {
if (error == -ENOENT)
- return d_splice_alias(NULL, dentry);
+ return (d_splice_alias(NULL, dentry));
else
- return ERR_PTR(error);
+ return (ERR_PTR(error));
}
- return d_splice_alias(ip, dentry);
+ return (d_splice_alias(ip, dentry));
}
/*
@@ -174,7 +174,7 @@ zpl_snapdir_automount(struct path *path)
error = -zfsctl_mount_snapshot(path, 0);
dentry->d_flags |= DCACHE_NEED_AUTOMOUNT;
if (error)
- return ERR_PTR(error);
+ return (ERR_PTR(error));
/*
* Rather than returning the new vfsmount for the snapshot we must
@@ -198,7 +198,7 @@ zpl_snapdir_revalidate(struct dentry *dentry, struct nameidata *i)
zpl_snapdir_revalidate(struct dentry *dentry, unsigned int flags)
#endif
{
- return 0;
+ return (0);
}
dentry_operations_t zpl_dops_snapdirs = {
@@ -237,13 +237,13 @@ zpl_snapdir_lookup(struct inode *dip, struct dentry *dentry,
crfree(cr);
if (error && error != -ENOENT)
- return ERR_PTR(error);
+ return (ERR_PTR(error));
ASSERT(error == 0 || ip == NULL);
d_clear_d_op(dentry);
d_set_d_op(dentry, &zpl_dops_snapdirs);
- return d_splice_alias(ip, dentry);
+ return (d_splice_alias(ip, dentry));
}
static int
@@ -334,7 +334,7 @@ zpl_snapdir_mkdir(struct inode *dip, struct dentry *dentry, zpl_umode_t mode)
int error;
crhold(cr);
- vap = kmem_zalloc(sizeof(vattr_t), KM_SLEEP);
+ vap = kmem_zalloc(sizeof (vattr_t), KM_SLEEP);
zpl_vap_init(vap, dip, mode | S_IFDIR, cr);
error = -zfsctl_snapdir_mkdir(dip, dname(dentry), vap, &ip, cr, 0);
@@ -344,7 +344,7 @@ zpl_snapdir_mkdir(struct inode *dip, struct dentry *dentry, zpl_umode_t mode)
d_instantiate(dentry, ip);
}
- kmem_free(vap, sizeof(vattr_t));
+ kmem_free(vap, sizeof (vattr_t));
ASSERT3S(error, <=, 0);
crfree(cr);
@@ -423,12 +423,12 @@ zpl_shares_lookup(struct inode *dip, struct dentry *dentry,
if (error) {
if (error == -ENOENT)
- return d_splice_alias(NULL, dentry);
+ return (d_splice_alias(NULL, dentry));
else
- return ERR_PTR(error);
+ return (ERR_PTR(error));
}
- return d_splice_alias(ip, dentry);
+ return (d_splice_alias(ip, dentry));
}
static int