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>
This commit is contained in:
Theodore Ts'o
2013-02-15 03:35:57 -05:00
parent dc6982ff4d
commit 0f70b40613
2 changed files with 33 additions and 34 deletions

View File

@@ -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)