diff options
author | Nitin Gupta <ngupta@vflare.org> | 2010-01-28 21:19:59 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-03 16:42:53 -0800 |
commit | c25d75a234df36446dc0d9bb3365ab8b83374d50 (patch) | |
tree | a7fe3c20e9b8eb8837e952ffc0306017514ec004 /drivers/staging/ramzswap/xvmalloc.c | |
parent | 2e882281742f7e483e751bbbaf6c0946b5f8513f (diff) |
Staging: ramzswap: Handle case for invalid backing swap
Currently, we crash (issue BUG_ON) if backing swap
disk size is zero. This can happen is user specified
an extended partition or simply a bad disk as backing
swap. A crash is really an unpleasant surprise to user
for such trivial problems.
Now, we check for this condition and simply fail device
initialization if this is the case.
Additional cleanups:
* use static for all functions
* remove extra newline between functions
* memset backing_swap_name to NULL on device reset
Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/ramzswap/xvmalloc.c')
0 files changed, 0 insertions, 0 deletions