diff options
author | Michael Kjorling <[email protected]> | 2013-11-01 20:26:11 +0100 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2013-12-18 16:46:35 -0800 |
commit | d1d7e2689db9e03f11c069ebc9f1ba12829e5dac (patch) | |
tree | 75b9a2b23334d5f673fb31f142f74146d351865c /module/zfs/zpl_inode.c | |
parent | 8ffef572ed2ba97e0c2d6a8aa2240012e611dc6f (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_inode.c')
-rw-r--r-- | module/zfs/zpl_inode.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/module/zfs/zpl_inode.c b/module/zfs/zpl_inode.c index 8f0fdaffe..c009807cb 100644 --- a/module/zfs/zpl_inode.c +++ b/module/zfs/zpl_inode.c @@ -42,7 +42,7 @@ zpl_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) int error; if (dlen(dentry) > ZFS_MAXNAMELEN) - return ERR_PTR(-ENAMETOOLONG); + return (ERR_PTR(-ENAMETOOLONG)); crhold(cr); error = -zfs_lookup(dir, dname(dentry), &ip, 0, cr, NULL, NULL); @@ -58,12 +58,12 @@ zpl_lookup(struct inode *dir, 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)); } void @@ -97,7 +97,7 @@ zpl_create(struct inode *dir, 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, dir, mode, cr); error = -zfs_create(dir, dname(dentry), vap, 0, mode, &ip, cr, 0, NULL); @@ -107,7 +107,7 @@ zpl_create(struct inode *dir, struct dentry *dentry, zpl_umode_t mode, d_instantiate(dentry, ip); } - kmem_free(vap, sizeof(vattr_t)); + kmem_free(vap, sizeof (vattr_t)); crfree(cr); ASSERT3S(error, <=, 0); @@ -131,7 +131,7 @@ zpl_mknod(struct inode *dir, struct dentry *dentry, zpl_umode_t mode, ASSERT(rdev == 0); crhold(cr); - vap = kmem_zalloc(sizeof(vattr_t), KM_SLEEP); + vap = kmem_zalloc(sizeof (vattr_t), KM_SLEEP); zpl_vap_init(vap, dir, mode, cr); vap->va_rdev = rdev; @@ -142,7 +142,7 @@ zpl_mknod(struct inode *dir, struct dentry *dentry, zpl_umode_t mode, d_instantiate(dentry, ip); } - kmem_free(vap, sizeof(vattr_t)); + kmem_free(vap, sizeof (vattr_t)); crfree(cr); ASSERT3S(error, <=, 0); @@ -172,7 +172,7 @@ zpl_mkdir(struct inode *dir, 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, dir, mode | S_IFDIR, cr); error = -zfs_mkdir(dir, dname(dentry), vap, &ip, cr, 0, NULL); @@ -182,7 +182,7 @@ zpl_mkdir(struct inode *dir, struct dentry *dentry, zpl_umode_t mode) d_instantiate(dentry, ip); } - kmem_free(vap, sizeof(vattr_t)); + kmem_free(vap, sizeof (vattr_t)); crfree(cr); ASSERT3S(error, <=, 0); @@ -239,7 +239,7 @@ zpl_setattr(struct dentry *dentry, struct iattr *ia) return (error); crhold(cr); - vap = kmem_zalloc(sizeof(vattr_t), KM_SLEEP); + vap = kmem_zalloc(sizeof (vattr_t), KM_SLEEP); vap->va_mask = ia->ia_valid & ATTR_IATTR_MASK; vap->va_mode = ia->ia_mode; vap->va_uid = KUID_TO_SUID(ia->ia_uid); @@ -253,7 +253,7 @@ zpl_setattr(struct dentry *dentry, struct iattr *ia) if (!error && (ia->ia_valid & ATTR_MODE)) error = zpl_chmod_acl(ip); - kmem_free(vap, sizeof(vattr_t)); + kmem_free(vap, sizeof (vattr_t)); crfree(cr); ASSERT3S(error, <=, 0); @@ -284,7 +284,7 @@ zpl_symlink(struct inode *dir, struct dentry *dentry, const char *name) int error; crhold(cr); - vap = kmem_zalloc(sizeof(vattr_t), KM_SLEEP); + vap = kmem_zalloc(sizeof (vattr_t), KM_SLEEP); zpl_vap_init(vap, dir, S_IFLNK | S_IRWXUGO, cr); error = -zfs_symlink(dir, dname(dentry), vap, (char *)name, &ip, cr, 0); @@ -293,7 +293,7 @@ zpl_symlink(struct inode *dir, struct dentry *dentry, const char *name) d_instantiate(dentry, ip); } - kmem_free(vap, sizeof(vattr_t)); + kmem_free(vap, sizeof (vattr_t)); crfree(cr); ASSERT3S(error, <=, 0); @@ -349,7 +349,7 @@ zpl_link(struct dentry *old_dentry, struct inode *dir, struct dentry *dentry) int error; if (ip->i_nlink >= ZFS_LINK_MAX) - return -EMLINK; + return (-EMLINK); crhold(cr); ip->i_ctime = CURRENT_TIME_SEC; @@ -371,7 +371,7 @@ out: #ifdef HAVE_INODE_TRUNCATE_RANGE static void -zpl_truncate_range(struct inode* ip, loff_t start, loff_t end) +zpl_truncate_range(struct inode *ip, loff_t start, loff_t end) { cred_t *cr = CRED(); flock64_t bf; @@ -402,7 +402,7 @@ zpl_truncate_range(struct inode* ip, loff_t start, loff_t end) static long zpl_fallocate(struct inode *ip, int mode, loff_t offset, loff_t len) { - return zpl_fallocate_common(ip, mode, offset, len); + return (zpl_fallocate_common(ip, mode, offset, len)); } #endif /* HAVE_INODE_FALLOCATE */ |