Skip to contentSkip to conversation

brd-return-enospc-rather-than-enomem-on-page-allocation-failure.patch removed from -mm tree

merged [email protected] 1 participant 1 message Jun 5, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Subject: [merged] brd-return-enospc-rather-than-enomem-on-page-allocation-failure.patch removed from -mm tree
To: [email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Thu, 05 Jun 2014 12:50:40 -0700

The patch titled
Subject: brd: return -ENOSPC rather than -ENOMEM on page allocation failure
has been removed from the -mm tree. Its filename was
brd-return-enospc-rather-than-enomem-on-page-allocation-failure.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Matthew Wilcox <[email protected]>
Subject: brd: return -ENOSPC rather than -ENOMEM on page allocation failure

brd is effectively a thinly provisioned device. Thinly provisioned devices return -ENOSPC when they can't write a new block. -ENOMEM is an implementation detail that callers shouldn't know.

---

 drivers/block/brd.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/block/brd.c renamed from drivers/block/brd.c~brd-return-enospc-rather-than-enomem-on-page-allocation-failure +3 -3
diff -puN drivers/block/brd.c~brd-return-enospc-rather-than-enomem-on-page-allocation-failure drivers/block/brd.c
@@ -200,11 +200,11 @@ static int copy_to_brd_setup(struct brd_
 
 	copy = min_t(size_t, n, PAGE_SIZE - offset);
 	if (!brd_insert_page(brd, sector))
-		return -ENOMEM;
+		return -ENOSPC;
 	if (copy < n) {
 		sector += copy >> SECTOR_SHIFT;
 		if (!brd_insert_page(brd, sector))
-			return -ENOMEM;
+			return -ENOSPC;
 	}
 	return 0;
 }
@@ -384,7 +384,7 @@ static int brd_direct_access(struct bloc
 		return -ERANGE;
 	page = brd_insert_page(brd, sector);
 	if (!page)
-		return -ENOMEM;
+		return -ENOSPC;
 	*kaddr = page_address(page);
 	*pfn = page_to_pfn(page);
 

_

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

origin.patch mm-introduce-do_shared_fault-and-drop-do_fault-fix-fix.patch do_shared_fault-check-that-mmap_sem-is-held.patch linux-next.patch