mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 09:59:32 +00:00
fs: sysv: Fix sysv_nblocks() returns wrong value
[ Upstream commite0c49bd2b4
] sysv_nblocks() returns 'blocks' rather than 'res', which only counting the number of triple-indirect blocks and causing sysv_getattr() gets a wrong result. [AV: this is actually a sysv counterpart of minixfs fix - 0fcd426de9d0 "[PATCH] minix block usage counting fix" in historical tree; mea culpa, should've thought to check fs/sysv back then...] Fixes:1da177e4c3
("Linux-2.6.12-rc2") Signed-off-by: Chen Zhongjin <chenzhongjin@huawei.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
cb5859603c
commit
7aa5325e1b
1 changed files with 1 additions and 1 deletions
|
@ -438,7 +438,7 @@ static unsigned sysv_nblocks(struct super_block *s, loff_t size)
|
||||||
res += blocks;
|
res += blocks;
|
||||||
direct = 1;
|
direct = 1;
|
||||||
}
|
}
|
||||||
return blocks;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
int sysv_getattr(const struct path *path, struct kstat *stat,
|
int sysv_getattr(const struct path *path, struct kstat *stat,
|
||||||
|
|
Loading…
Reference in a new issue