summaryrefslogtreecommitdiffstats
path: root/fs/ext4/inode.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2013-02-15 03:35:57 -0500
committerTheodore Ts'o <tytso@mit.edu>2013-02-15 03:35:57 -0500
commit0f70b40613ee14b0cadafeb461034cff81b4419a (patch)
tree10ba1447b672e41bbacdaaf9131844f64c85be4b /fs/ext4/inode.c
parentdc6982ff4db1f47da73b1967ef5302d6721e5b95 (diff)
downloadtalos-op-linux-0f70b40613ee14b0cadafeb461034cff81b4419a.tar.gz
talos-op-linux-0f70b40613ee14b0cadafeb461034cff81b4419a.zip
ext4: use ERR_PTR() abstraction for ext4_append()
Use ERR_PTR()/IS_ERR() abstraction instead of passing in a separate pointer to an integer for the error code, as a code cleanup. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/inode.c')
-rw-r--r--fs/ext4/inode.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index c4e9177f60c6..f4466c3650dc 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -707,6 +707,8 @@ struct buffer_head *ext4_getblk(handle_t *handle, struct inode *inode,
/* ensure we send some value back into *errp */
*errp = 0;
+ if (create && err == 0)
+ err = -ENOSPC; /* should never happen */
if (err < 0)
*errp = err;
if (err <= 0)
OpenPOWER on IntegriCloud