mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/1] ufs: return correct errno for write_inode()
@ 2015-03-20 21:47 Taesoo Kim
  0 siblings, 0 replies; only message in thread
From: Taesoo Kim @ 2015-03-20 21:47 UTC (permalink / raw)
  To: dushistov, linux-kernel
  Cc: taesoo, changwoo, sanidhya, blee, csong84, Taesoo Kim

Instead of -1, properly return -EIO upon write_inode()
error, similar/consistant to the rest of filesystems.

Signed-off-by: Taesoo Kim <tsgatesv@gmail.com>
---
 fs/ufs/inode.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/ufs/inode.c b/fs/ufs/inode.c
index be7d42c..9f910d8 100644
--- a/fs/ufs/inode.c
+++ b/fs/ufs/inode.c
@@ -836,13 +836,13 @@ static int ufs_update_inode(struct inode * inode, int do_sync)
 	if (inode->i_ino < UFS_ROOTINO ||
 	    inode->i_ino > (uspi->s_ncg * uspi->s_ipg)) {
 		ufs_warning (sb, "ufs_read_inode", "bad inode number (%lu)\n", inode->i_ino);
-		return -1;
+		return -EIO;
 	}
 
 	bh = sb_bread(sb, ufs_inotofsba(inode->i_ino));
 	if (!bh) {
 		ufs_warning (sb, "ufs_read_inode", "unable to read inode %lu\n", inode->i_ino);
-		return -1;
+		return -EIO;
 	}
 	if (uspi->fs_magic == UFS2_MAGIC) {
 		struct ufs2_inode *ufs2_inode = (struct ufs2_inode *)bh->b_data;
-- 
2.3.3


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-03-20 21:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-20 21:47 [PATCH 1/1] ufs: return correct errno for write_inode() Taesoo Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®