More patch description fixups. Standardize case.
[ext4-patch-queue.git] / ext4_reserve_global_return_error_fix.patch
blob443f1d0cb345d564b7e93d98079cbb9296a01b32
1 ext4: Reserve global return error fix
3 From: Dmitriy Monakhov <dmonakhov@openvz.org>
5 simple test: strace dd if=/dev/zero of=/mnt/file
7 open("/dev/zero", O_RDONLY) = 0
8 close(1) = 0
9 open("/mnt/test/file", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 1
10 read(0, "\0\0\0\0\0\0\0\0\0"..., 512) = 512
11 write(1, "\0\0\0\0\0\0\0\0"..., 512) = 512
12 read(0, "\0\0\0\0\0\0\0\0\0"..., 512) = 512
13 write(1, "\0\0\0\0\0\0\0\0"..., 512) = -1 ENOENT (No such fil
14 e or directory)
16 This strange error returned from ext4_reserve_global().
17 It's just typo because:
18 a) In fact this is 100% ENOSPC situation
19 b) simular function ext4_reserve_local() returns -ENOSPC
21 Signed-off-by: Mingming Cao <cmm@us.ibm.com>
22 Signed-off-by: Dmitriy Monakhov <dmonakhov@openvz.org>
23 ---
24 fs/ext4/balloc.c | 2 +-
25 1 file changed, 1 insertion(+), 1 deletion(-)
27 Index: linux-2.6.23-rc3/fs/ext4/balloc.c
28 ===================================================================
29 --- linux-2.6.23-rc3.orig/fs/ext4/balloc.c 2007-08-14 16:37:58.000000000 -0700
30 +++ linux-2.6.23-rc3/fs/ext4/balloc.c 2007-08-14 17:11:34.000000000 -0700
31 @@ -1920,7 +1920,7 @@ int ext4_reserve_global(struct super_blo
33 struct ext4_sb_info *sbi = EXT4_SB(sb);
34 struct ext4_reservation_slot *rs;
35 - int i, rc = -ENOENT;
36 + int i, rc = -ENOSPC;
37 __u64 free = 0;
39 rs = sbi->s_reservation_slots;