mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #5617 from liggitt/preallocation
fileutil: avoid double preallocation
This commit is contained in:
commit
bdc7035c10
@ -23,7 +23,7 @@ import "os"
|
||||
// Otherwise, the error encountered will be returned.
|
||||
func Preallocate(f *os.File, sizeInBytes int64, extendFile bool) error {
|
||||
if extendFile {
|
||||
preallocExtend(f, sizeInBytes)
|
||||
return preallocExtend(f, sizeInBytes)
|
||||
}
|
||||
return preallocFixed(f, sizeInBytes)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user