Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a1c83681 authored by Viresh Kumar's avatar Viresh Kumar Committed by Jiri Kosina
Browse files

fs: Drop unlikely before IS_ERR(_OR_NULL)



IS_ERR(_OR_NULL) already contain an 'unlikely' compiler flag and there
is no need to do that again from its callers. Drop it.

Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: default avatarJeff Layton <jlayton@poochiereds.net>
Reviewed-by: default avatarDavid Howells <dhowells@redhat.com>
Reviewed-by: default avatarSteve French <smfrench@gmail.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent bf69a3b6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -84,7 +84,7 @@ cifs_prime_dcache(struct dentry *parent, struct qstr *name,
	cifs_dbg(FYI, "%s: for %s\n", __func__, name->name);

	dentry = d_hash_and_lookup(parent, name);
	if (unlikely(IS_ERR(dentry)))
	if (IS_ERR(dentry))
		return;

	if (dentry) {
+1 −1
Original line number Diff line number Diff line
@@ -270,7 +270,7 @@ ecryptfs_create(struct inode *directory_inode, struct dentry *ecryptfs_dentry,

	ecryptfs_inode = ecryptfs_do_create(directory_inode, ecryptfs_dentry,
					    mode);
	if (unlikely(IS_ERR(ecryptfs_inode))) {
	if (IS_ERR(ecryptfs_inode)) {
		ecryptfs_printk(KERN_WARNING, "Failed to create file in"
				"lower filesystem\n");
		rc = PTR_ERR(ecryptfs_inode);
+3 −3
Original line number Diff line number Diff line
@@ -899,7 +899,7 @@ ext4_find_extent(struct inode *inode, ext4_lblk_t block,

		bh = read_extent_tree_block(inode, path[ppos].p_block, --i,
					    flags);
		if (unlikely(IS_ERR(bh))) {
		if (IS_ERR(bh)) {
			ret = PTR_ERR(bh);
			goto err;
		}
@@ -5792,7 +5792,7 @@ ext4_swap_extents(handle_t *handle, struct inode *inode1,
		int split = 0;

		path1 = ext4_find_extent(inode1, lblk1, NULL, EXT4_EX_NOCACHE);
		if (unlikely(IS_ERR(path1))) {
		if (IS_ERR(path1)) {
			*erp = PTR_ERR(path1);
			path1 = NULL;
		finish:
@@ -5800,7 +5800,7 @@ ext4_swap_extents(handle_t *handle, struct inode *inode1,
			goto repeat;
		}
		path2 = ext4_find_extent(inode2, lblk2, NULL, EXT4_EX_NOCACHE);
		if (unlikely(IS_ERR(path2))) {
		if (IS_ERR(path2)) {
			*erp = PTR_ERR(path2);
			path2 = NULL;
			goto finish;
+1 −1
Original line number Diff line number Diff line
@@ -1429,7 +1429,7 @@ static struct buffer_head * ext4_find_entry (struct inode *dir,
				}
				num++;
				bh = ext4_getblk(NULL, dir, b++, 0);
				if (unlikely(IS_ERR(bh))) {
				if (IS_ERR(bh)) {
					if (ra_max == 0) {
						ret = bh;
						goto cleanup_and_exit;
+2 −2
Original line number Diff line number Diff line
@@ -1942,7 +1942,7 @@ static int link_path_walk(const char *name, struct nameidata *nd)
		if (err) {
			const char *s = get_link(nd);

			if (unlikely(IS_ERR(s)))
			if (IS_ERR(s))
				return PTR_ERR(s);
			err = 0;
			if (unlikely(!s)) {
@@ -3356,7 +3356,7 @@ struct file *do_file_open_root(struct dentry *dentry, struct vfsmount *mnt,
		return ERR_PTR(-ELOOP);

	filename = getname_kernel(name);
	if (unlikely(IS_ERR(filename)))
	if (IS_ERR(filename))
		return ERR_CAST(filename);

	set_nameidata(&nd, -1, filename);
Loading