aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-08-22 23:05:01 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-08-22 23:05:01 -0700
commit579aa5b4517cf0b3b4288567de6dfc7c5df081dd (patch)
tree5c6dfe449e3fe8a089661ba710fab698f17c6fce /fs
parent3b0b17a8cf0d6c737c79a041626b0528f637b65b (diff)
downloadhistory-579aa5b4517cf0b3b4288567de6dfc7c5df081dd.tar.gz
[PATCH] IS_ERR() unlikeliness cleanup
Remove now-unneeded open-coded unlikelies around IS_ERR(). Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/ntfs/aops.c6
-rw-r--r--fs/ntfs/attrib.c4
-rw-r--r--fs/ntfs/dir.c10
-rw-r--r--fs/ntfs/index.c2
-rw-r--r--fs/ntfs/inode.c8
-rw-r--r--fs/ntfs/mft.c4
-rw-r--r--fs/ntfs/namei.c6
7 files changed, 20 insertions, 20 deletions
diff --git a/fs/ntfs/aops.c b/fs/ntfs/aops.c
index 0ffc1d19c9de05..35bcefbe158806 100644
--- a/fs/ntfs/aops.c
+++ b/fs/ntfs/aops.c
@@ -393,7 +393,7 @@ int ntfs_readpage(struct file *file, struct page *page)
/* Map, pin, and lock the mft record. */
mrec = map_mft_record(base_ni);
- if (unlikely(IS_ERR(mrec))) {
+ if (IS_ERR(mrec)) {
err = PTR_ERR(mrec);
goto err_out;
}
@@ -1111,7 +1111,7 @@ static int ntfs_writepage(struct page *page, struct writeback_control *wbc)
/* Map, pin, and lock the mft record. */
m = map_mft_record(base_ni);
- if (unlikely(IS_ERR(m))) {
+ if (IS_ERR(m)) {
err = PTR_ERR(m);
m = NULL;
ctx = NULL;
@@ -1885,7 +1885,7 @@ static int ntfs_commit_write(struct file *file, struct page *page,
/* Map, pin, and lock the mft record. */
m = map_mft_record(base_ni);
- if (unlikely(IS_ERR(m))) {
+ if (IS_ERR(m)) {
err = PTR_ERR(m);
m = NULL;
ctx = NULL;
diff --git a/fs/ntfs/attrib.c b/fs/ntfs/attrib.c
index 55686f7bdc6b10..3d08b82f7505d9 100644
--- a/fs/ntfs/attrib.c
+++ b/fs/ntfs/attrib.c
@@ -507,7 +507,7 @@ run_list_element *ntfs_merge_run_lists(run_list_element *drl,
/* Check for silly calling... */
if (unlikely(!srl))
return drl;
- if (unlikely(IS_ERR(srl) || IS_ERR(drl)))
+ if (IS_ERR(srl) || IS_ERR(drl))
return ERR_PTR(-EINVAL);
/* Check for the case where the first mapping is being done now. */
@@ -977,7 +977,7 @@ int map_run_list(ntfs_inode *ni, VCN vcn)
rl = decompress_mapping_pairs(ni->vol, ctx->attr,
ni->run_list.rl);
- if (unlikely(IS_ERR(rl)))
+ if (IS_ERR(rl))
err = PTR_ERR(rl);
else
ni->run_list.rl = rl;
diff --git a/fs/ntfs/dir.c b/fs/ntfs/dir.c
index 24686227960ca3..ccec0960f26d3b 100644
--- a/fs/ntfs/dir.c
+++ b/fs/ntfs/dir.c
@@ -95,7 +95,7 @@ MFT_REF ntfs_lookup_inode_by_name(ntfs_inode *dir_ni, const ntfschar *uname,
BUG_ON(NInoAttr(dir_ni));
/* Get hold of the mft record for the directory. */
m = map_mft_record(dir_ni);
- if (unlikely(IS_ERR(m))) {
+ if (IS_ERR(m)) {
ntfs_error(sb, "map_mft_record() failed with error code %ld.",
-PTR_ERR(m));
return ERR_MREF(PTR_ERR(m));
@@ -1170,7 +1170,7 @@ static int ntfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
goto skip_index_root;
/* Get hold of the mft record for the directory. */
m = map_mft_record(ndir);
- if (unlikely(IS_ERR(m))) {
+ if (IS_ERR(m)) {
err = PTR_ERR(m);
m = NULL;
goto err_out;
@@ -1261,7 +1261,7 @@ skip_index_root:
if (unlikely(!bmp_vi)) {
ntfs_debug("Inode 0x%lx, regetting index bitmap.", vdir->i_ino);
bmp_vi = ntfs_attr_iget(vdir, AT_BITMAP, I30, 4);
- if (unlikely(IS_ERR(bmp_vi))) {
+ if (IS_ERR(bmp_vi)) {
ntfs_error(sb, "Failed to get bitmap attribute.");
err = PTR_ERR(bmp_vi);
goto err_out;
@@ -1286,7 +1286,7 @@ get_next_bmp_page:
((PAGE_CACHE_SIZE * 8) - 1));
bmp_page = ntfs_map_page(bmp_mapping,
bmp_pos >> (3 + PAGE_CACHE_SHIFT));
- if (unlikely(IS_ERR(bmp_page))) {
+ if (IS_ERR(bmp_page)) {
ntfs_error(sb, "Reading index bitmap failed.");
err = PTR_ERR(bmp_page);
bmp_page = NULL;
@@ -1327,7 +1327,7 @@ find_next_index_buffer:
* reading it from disk if necessary.
*/
ia_page = ntfs_map_page(ia_mapping, ia_pos >> PAGE_CACHE_SHIFT);
- if (unlikely(IS_ERR(ia_page))) {
+ if (IS_ERR(ia_page)) {
ntfs_error(sb, "Reading index allocation data failed.");
err = PTR_ERR(ia_page);
ia_page = NULL;
diff --git a/fs/ntfs/index.c b/fs/ntfs/index.c
index f4396a02a722da..786f6126b62c66 100644
--- a/fs/ntfs/index.c
+++ b/fs/ntfs/index.c
@@ -157,7 +157,7 @@ int ntfs_index_lookup(const void *key, const int key_len,
}
/* Get hold of the mft record for the index inode. */
m = map_mft_record(base_ni);
- if (unlikely(IS_ERR(m))) {
+ if (IS_ERR(m)) {
ntfs_error(sb, "map_mft_record() failed with error code %ld.",
-PTR_ERR(m));
return PTR_ERR(m);
diff --git a/fs/ntfs/inode.c b/fs/ntfs/inode.c
index 686d5bbb52a54e..e24aa9bb238e8c 100644
--- a/fs/ntfs/inode.c
+++ b/fs/ntfs/inode.c
@@ -900,7 +900,7 @@ skip_attr_list_load:
ctx = NULL;
/* Get the index bitmap attribute inode. */
bvi = ntfs_attr_iget(vi, AT_BITMAP, I30, 4);
- if (unlikely(IS_ERR(bvi))) {
+ if (IS_ERR(bvi)) {
ntfs_error(vi->i_sb, "Failed to get bitmap attribute.");
err = PTR_ERR(bvi);
goto unm_err_out;
@@ -1552,7 +1552,7 @@ static int ntfs_read_locked_index_inode(struct inode *base_vi, struct inode *vi)
ctx = NULL;
/* Get the index bitmap attribute inode. */
bvi = ntfs_attr_iget(base_vi, AT_BITMAP, ni->name, ni->name_len);
- if (unlikely(IS_ERR(bvi))) {
+ if (IS_ERR(bvi)) {
ntfs_error(vi->i_sb, "Failed to get bitmap attribute.");
err = PTR_ERR(bvi);
goto unm_err_out;
@@ -2336,7 +2336,7 @@ void ntfs_write_inode(struct inode *vi, int sync)
}
/* Map, pin, and lock the mft record belonging to the inode. */
m = map_mft_record(ni);
- if (unlikely(IS_ERR(m))) {
+ if (IS_ERR(m)) {
err = PTR_ERR(m);
goto err_out;
}
@@ -2391,7 +2391,7 @@ void ntfs_write_inode(struct inode *vi, int sync)
MFT_RECORD *tm = map_mft_record(tni);
int ret;
- if (unlikely(IS_ERR(tm))) {
+ if (IS_ERR(tm)) {
if (!err || err == -ENOMEM)
err = PTR_ERR(tm);
continue;
diff --git a/fs/ntfs/mft.c b/fs/ntfs/mft.c
index 712f7ad0ac501b..ed6f5bbe3c8fbe 100644
--- a/fs/ntfs/mft.c
+++ b/fs/ntfs/mft.c
@@ -391,7 +391,7 @@ map_err_out:
ni->ext.base_ntfs_ino = base_ni;
/* Now map the record. */
m = map_mft_record(ni);
- if (unlikely(IS_ERR(m))) {
+ if (IS_ERR(m)) {
up(&base_ni->extent_lock);
atomic_dec(&base_ni->count);
ntfs_clear_extent_inode(ni);
@@ -571,7 +571,7 @@ static int sync_mft_mirror(ntfs_inode *ni, MFT_RECORD *m, int sync)
/* Get the page containing the mirror copy of the mft record @m. */
page = ntfs_map_page(vol->mftmirr_ino->i_mapping, ni->mft_no >>
(PAGE_CACHE_SHIFT - vol->mft_record_size_bits));
- if (unlikely(IS_ERR(page))) {
+ if (IS_ERR(page)) {
ntfs_error(vol->sb, "Failed to map mft mirror page.");
err = PTR_ERR(page);
goto err_out;
diff --git a/fs/ntfs/namei.c b/fs/ntfs/namei.c
index c5ab58086c2615..4731d0979a14b4 100644
--- a/fs/ntfs/namei.c
+++ b/fs/ntfs/namei.c
@@ -376,7 +376,7 @@ struct dentry *ntfs_get_parent(struct dentry *child_dent)
ntfs_debug("Entering for inode 0x%lx.", vi->i_ino);
/* Get the mft record of the inode belonging to the child dentry. */
mrec = map_mft_record(ni);
- if (unlikely(IS_ERR(mrec)))
+ if (IS_ERR(mrec))
return (struct dentry *)mrec;
/* Find the first file name attribute in the mft record. */
ctx = get_attr_search_ctx(ni, mrec);
@@ -408,7 +408,7 @@ try_next:
unmap_mft_record(ni);
/* Get the inode of the parent directory. */
parent_vi = ntfs_iget(vi->i_sb, parent_ino);
- if (unlikely(IS_ERR(parent_vi) || is_bad_inode(parent_vi))) {
+ if (IS_ERR(parent_vi) || unlikely(is_bad_inode(parent_vi))) {
if (!IS_ERR(parent_vi))
iput(parent_vi);
ntfs_error(vi->i_sb, "Failed to get parent directory inode "
@@ -451,7 +451,7 @@ struct dentry *ntfs_get_dentry(struct super_block *sb, void *fh)
ntfs_debug("Entering for inode 0x%lx, generation 0x%x.", ino, gen);
vi = ntfs_iget(sb, ino);
- if (unlikely(IS_ERR(vi))) {
+ if (IS_ERR(vi)) {
ntfs_error(sb, "Failed to get inode 0x%lx.", ino);
return (struct dentry *)vi;
}