git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vserver 1.9.3
[linux-2.6.git]
/
fs
/
quota_v1.c
diff --git
a/fs/quota_v1.c
b/fs/quota_v1.c
index
2ffb492
..
a6cffda
100644
(file)
--- a/
fs/quota_v1.c
+++ b/
fs/quota_v1.c
@@
-52,6
+52,8
@@
static int v1_read_dqblk(struct dquot *dquot)
/* Now we are sure filp is valid */
offset = v1_dqoff(dquot->dq_id);
/* Now we are sure filp is valid */
offset = v1_dqoff(dquot->dq_id);
+ /* Set structure to 0s in case read fails/is after end of file */
+ memset(&dqblk, 0, sizeof(struct v1_disk_dqblk));
fs = get_fs();
set_fs(KERNEL_DS);
filp->f_op->read(filp, (char *)&dqblk, sizeof(struct v1_disk_dqblk), &offset);
fs = get_fs();
set_fs(KERNEL_DS);
filp->f_op->read(filp, (char *)&dqblk, sizeof(struct v1_disk_dqblk), &offset);
@@
-113,8
+115,8
@@
out:
/* Header of new quota format */
struct v2_disk_dqheader {
/* Header of new quota format */
struct v2_disk_dqheader {
- __
u
32 dqh_magic; /* Magic number identifying file */
- __
u
32 dqh_version; /* File version */
+ __
le
32 dqh_magic; /* Magic number identifying file */
+ __
le
32 dqh_version; /* File version */
};
static int v1_check_quota_file(struct super_block *sb, int type)
};
static int v1_check_quota_file(struct super_block *sb, int type)