projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b05fd87
)
btrfs: replace EINVAL with ERANGE for resize when ULLONG_MAX
author
Gui Hecheng
<guihc.fnst@cn.fujitsu.com>
Thu, 29 May 2014 01:19:58 +0000
(09:19 +0800)
committer
Chris Mason
<clm@fb.com>
Tue, 10 Jun 2014 00:21:07 +0000
(17:21 -0700)
To be accurate about the error case,
if the new size is beyond ULLONG_MAX, return ERANGE instead of EINVAL.
Signed-off-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/ioctl.c
patch
|
blob
|
history
diff --git
a/fs/btrfs/ioctl.c
b/fs/btrfs/ioctl.c
index 219e26fa90697b3f5f81c1cc85e2df0ec5d03fa2..55f4d717d541917e3efc03a7f95a6ed437b482bf 100644
(file)
--- a/
fs/btrfs/ioctl.c
+++ b/
fs/btrfs/ioctl.c
@@
-1593,7
+1593,7
@@
static noinline int btrfs_ioctl_resize(struct file *file,
new_size = old_size - new_size;
} else if (mod > 0) {
if (new_size > ULLONG_MAX - old_size) {
- ret = -E
INVAL
;
+ ret = -E
RANGE
;
goto out_free;
}
new_size = old_size + new_size;