diff options
author | Jan Kara <jack@suse.cz> | 2011-11-16 14:04:19 +0100 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2011-11-16 14:04:19 +0100 |
commit | b21068b188539573f39525c296202c071ad594fe (patch) | |
tree | beef9dd736fcfda73f953e7359569eb3d2eb2702 | |
parent | 717f5e4b6095325f7ea0329cb677300a92d2766c (diff) | |
download | linuxquota-b21068b188539573f39525c296202c071ad594fe.tar.gz |
quotaon: Remove duplicated check for hasquota()
We check hasquota() twice needlessly when changing quota state. Remove
one of the checks.
Signed-off-by: Jan Kara <jack@suse.cz>
-rw-r--r-- | quotaon.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -248,8 +248,7 @@ static int v1_newstate(struct mntent *mnt, int type, char *file, int flags, int return 1; if ((flags & STATEFLAG_OFF) && hasmntopt(mnt, MNTOPT_RSQUASH)) errs += quotarsquashonoff(dev, type, flags); - if (hasquota(mnt, type, 0)) - errs += quotaonoff((char *)dev, mnt->mnt_dir, file, type, QF_VFSOLD, flags); + errs += quotaonoff((char *)dev, mnt->mnt_dir, file, type, QF_VFSOLD, flags); if ((flags & STATEFLAG_ON) && hasmntopt(mnt, MNTOPT_RSQUASH)) errs += quotarsquashonoff(dev, type, flags); free((char *)dev); @@ -266,8 +265,7 @@ static int v2_newstate(struct mntent *mnt, int type, char *file, int flags, int if (!dev) return 1; - if (hasquota(mnt, type, 0)) - errs = quotaonoff((char *)dev, mnt->mnt_dir, file, type, fmt, flags); + errs = quotaonoff((char *)dev, mnt->mnt_dir, file, type, fmt, flags); free((char *)dev); return errs; } |