]> git.baikalelectronics.ru Git - kernel.git/commit
brd: return -ENOSPC rather than -ENOMEM on page allocation failure
authorMatthew Wilcox <matthew.r.wilcox@intel.com>
Wed, 4 Jun 2014 23:07:50 +0000 (16:07 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 4 Jun 2014 23:54:02 +0000 (16:54 -0700)
commita0e8e38e321ff960a76bc686324dabe4abe6ce9b
tree1c8423c21320beb5a499a7fcf891e8d4debef1c1
parent155bfa2b5e2caa0c911c814ccd4cb77b2fe07709
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.

Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
Acked-by: Dave Chinner <david@fromorbit.com>
Cc: Dheeraj Reddy <dheeraj.reddy@intel.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/block/brd.c