Skip to contentSkip to conversation

+ ocfs2-return-enomem-when-sb_getblk-fails-update.patch added to -mm tree

PATCH [email protected] 1 participant 1 message Sep 18, 2013 OCFS2

lore
Share & tools
lore
#0 lore raw

Subject: + ocfs2-return-enomem-when-sb_getblk-fails-update.patch added to -mm tree
To: [email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Wed, 18 Sep 2013 16:14:24 -0700

The patch titled
Subject: ocfs2-return-enomem-when-sb_getblk-fails-update
has been added to the -mm tree. Its filename is
ocfs2-return-enomem-when-sb_getblk-fails-update.patch

This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/ocfs2-return-enomem-when-sb_getblk-fails-update.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/ocfs2-return-enomem-when-sb_getblk-fails-update.patch

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated there every 3-4 working days

------------------------------------------------------
From: Joseph Qi <[email protected]>
Subject: ocfs2-return-enomem-when-sb_getblk-fails-update

ocfs2_symlink_get_block in aops.c, and ocfs2_read_blocks_sync and ocfs2_read_blocks in buffer_head_io.c need do the same change for consistency.

Cc Rui Xiang <[email protected]>
Cc Jie Liu <[email protected]>
Cc Mark Fasheh <[email protected]>
Cc Joel Becker <[email protected]>

---

 fs/ocfs2/aops.c           |    1 +
 fs/ocfs2/buffer_head_io.c |    4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)
fs/ocfs2/aops.c renamed from fs/ocfs2/aops.c~ocfs2-return-enomem-when-sb_getblk-fails-update +1 -0
diff -puN fs/ocfs2/aops.c~ocfs2-return-enomem-when-sb_getblk-fails-update fs/ocfs2/aops.c
@@ -93,6 +93,7 @@ static int ocfs2_symlink_get_block(struc
 			    iblock;
 		buffer_cache_bh = sb_getblk(osb->sb, blkno);
 		if (!buffer_cache_bh) {
+			err = -ENOMEM;
 			mlog(ML_ERROR, "couldn't getblock for symlink!\n");
 			goto bail;
 		}
fs/ocfs2/buffer_head_io.c renamed from fs/ocfs2/buffer_head_io.c~ocfs2-return-enomem-when-sb_getblk-fails-update +2 -2
diff -puN fs/ocfs2/buffer_head_io.c~ocfs2-return-enomem-when-sb_getblk-fails-update fs/ocfs2/buffer_head_io.c
@@ -115,7 +115,7 @@ int ocfs2_read_blocks_sync(struct ocfs2_
 		if (bhs[i] == NULL) {
 			bhs[i] = sb_getblk(osb->sb, block++);
 			if (bhs[i] == NULL) {
-				status = -EIO;
+				status = -ENOMEM;
 				mlog_errno(status);
 				goto bail;
 			}
@@ -214,7 +214,7 @@ int ocfs2_read_blocks(struct ocfs2_cachi
 			bhs[i] = sb_getblk(sb, block++);
 			if (bhs[i] == NULL) {
 				ocfs2_metadata_cache_io_unlock(ci);
-				status = -EIO;
+				status = -ENOMEM;
 				mlog_errno(status);
 				goto bail;
 			}

_

Patches currently in -mm which might be from [email protected] are

ocfs2-return-enomem-when-sb_getblk-fails-update.patch