diff options
author | jkar8572 <jkar8572> | 2010-05-27 13:12:57 +0000 |
---|---|---|
committer | jkar8572 <jkar8572> | 2010-05-27 13:12:57 +0000 |
commit | b58944b582722dd3c56893eb4b6c8b8a0291201d (patch) | |
tree | 2e14a35553f2d7f7ee4b33724125dd5d1c513776 /quotaio.c | |
parent | 4d4237de538f7c42b157dfa0ef5d711ae72d3566 (diff) | |
download | linuxquota-b58944b582722dd3c56893eb4b6c8b8a0291201d.tar.gz |
* fix repquota to get latest quota info header (Jan Kara)
Diffstat (limited to 'quotaio.c')
-rw-r--r-- | quotaio.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -147,6 +147,15 @@ struct quota_handle *init_io(struct mntent *mnt, int type, int fmt, int flags) } } if (!QIO_ENABLED(h) || flags & IOI_OPENFILE) { /* Need to open file? */ + if (QIO_ENABLED(h)) { /* Kernel uses same file? */ + unsigned int cmd = + (kernel_iface == IFACE_GENERIC) ? Q_SYNC : Q_6_5_SYNC; + if (quotactl(QCMD(cmd, h->qh_type), h->qh_quotadev, + 0, NULL) < 0) { + die(4, _("Cannot sync quotas on device %s: %s\n"), + h->qh_quotadev, strerror(errno)); + } + } /* We still need to open file for operations like 'repquota' */ if ((fd = open(qfname, QIO_RO(h) ? O_RDONLY : O_RDWR)) < 0) { errstr(_("Cannot open quotafile %s: %s\n"), |