diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2022-10-19 18:31:33 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:44 -0400 |
commit | 3e3e02e6bce627ed9e3a5d9fd3118e6569dc2548 (patch) | |
tree | 33fc60a2903692a2038dd4b87dfa6b87a207b7e1 /fs/bcachefs/fs.c | |
parent | ed80c5699a23c4005ba8e81d4b8fb3e1b922fa40 (diff) | |
download | linux-3e3e02e6bce627ed9e3a5d9fd3118e6569dc2548.tar.gz linux-3e3e02e6bce627ed9e3a5d9fd3118e6569dc2548.tar.bz2 linux-3e3e02e6bce627ed9e3a5d9fd3118e6569dc2548.zip |
bcachefs: Assorted checkpatch fixes
checkpatch.pl gives lots of warnings that we don't want - suggested
ignore list:
ASSIGN_IN_IF
UNSPECIFIED_INT - bcachefs coding style prefers single token type names
NEW_TYPEDEFS - typedefs are occasionally good
FUNCTION_ARGUMENTS - we prefer to look at functions in .c files
(hopefully with docbook documentation), not .h
file prototypes
MULTISTATEMENT_MACRO_USE_DO_WHILE
- we have _many_ x-macros and other macros where
we can't do this
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/fs.c')
-rw-r--r-- | fs/bcachefs/fs.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/bcachefs/fs.c b/fs/bcachefs/fs.c index 66fcd3e28e0c..485cb9cbcd51 100644 --- a/fs/bcachefs/fs.c +++ b/fs/bcachefs/fs.c @@ -528,7 +528,7 @@ static int bch2_symlink(struct mnt_idmap *idmap, inode = __bch2_create(idmap, dir, dentry, S_IFLNK|S_IRWXUGO, 0, (subvol_inum) { 0 }, BCH_CREATE_TMPFILE); - if (unlikely(IS_ERR(inode))) + if (IS_ERR(inode)) return bch2_err_class(PTR_ERR(inode)); inode_lock(&inode->v); @@ -1847,7 +1847,7 @@ got_sb: sb->s_time_min = div_s64(S64_MIN, c->sb.time_units_per_sec) + 1; sb->s_time_max = div_s64(S64_MAX, c->sb.time_units_per_sec); c->vfs_sb = sb; - strlcpy(sb->s_id, c->name, sizeof(sb->s_id)); + strscpy(sb->s_id, c->name, sizeof(sb->s_id)); ret = super_setup_bdi(sb); if (ret) @@ -1918,8 +1918,7 @@ MODULE_ALIAS_FS("bcachefs"); void bch2_vfs_exit(void) { unregister_filesystem(&bcache_fs_type); - if (bch2_inode_cache) - kmem_cache_destroy(bch2_inode_cache); + kmem_cache_destroy(bch2_inode_cache); } int __init bch2_vfs_init(void) |