aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/quota
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2007-08-30 03:21:12 -0400
committerTim Shimmin <tes@chook.melbourne.sgi.com>2007-10-15 21:45:57 -0400
commitbd186aa901c183d6e25257711b6c64b42a90dde0 (patch)
treea84157145a249923a79276d7bc9170701b100c43 /fs/xfs/quota
parent0ce4cfd4f7dde5891d5b3e3c1a28ff7a7b4d36b3 (diff)
[XFS] kill the vfs_flags member in struct bhv_vfs
All flags are added to xfs_mount's m_flag instead. Note that the 32bit inode flag was duplicated in both of them, but only cleared in the mount when it was not nessecary due to the filesystem beeing small enough. Two flags are still required here - one to indicate the mount option setting, and one to indicate if it applies or not. SGI-PV: 969608 SGI-Modid: xfs-linux-melb:xfs-kern:29507a Signed-off-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: David Chinner <dgc@sgi.com> Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs/xfs/quota')
-rw-r--r--fs/xfs/quota/xfs_qm.c3
-rw-r--r--fs/xfs/quota/xfs_qm_syscalls.c16
2 files changed, 8 insertions, 11 deletions
diff --git a/fs/xfs/quota/xfs_qm.c b/fs/xfs/quota/xfs_qm.c
index 8f5a43669297..b5f91281b707 100644
--- a/fs/xfs/quota/xfs_qm.c
+++ b/fs/xfs/quota/xfs_qm.c
@@ -2417,8 +2417,7 @@ xfs_qm_vop_dqalloc(
2417 lockflags = XFS_ILOCK_EXCL; 2417 lockflags = XFS_ILOCK_EXCL;
2418 xfs_ilock(ip, lockflags); 2418 xfs_ilock(ip, lockflags);
2419 2419
2420 if ((flags & XFS_QMOPT_INHERIT) && 2420 if ((flags & XFS_QMOPT_INHERIT) && XFS_INHERIT_GID(ip))
2421 XFS_INHERIT_GID(ip, XFS_MTOVFS(mp)))
2422 gid = ip->i_d.di_gid; 2421 gid = ip->i_d.di_gid;
2423 2422
2424 /* 2423 /*
diff --git a/fs/xfs/quota/xfs_qm_syscalls.c b/fs/xfs/quota/xfs_qm_syscalls.c
index e0d024e73453..ad5579d4eac4 100644
--- a/fs/xfs/quota/xfs_qm_syscalls.c
+++ b/fs/xfs/quota/xfs_qm_syscalls.c
@@ -86,10 +86,8 @@ xfs_qm_quotactl(
86 int id, 86 int id,
87 xfs_caddr_t addr) 87 xfs_caddr_t addr)
88{ 88{
89 bhv_vfs_t *vfsp = XFS_MTOVFS(mp);
90 int error; 89 int error;
91 90
92
93 ASSERT(addr != NULL || cmd == Q_XQUOTASYNC); 91 ASSERT(addr != NULL || cmd == Q_XQUOTASYNC);
94 92
95 /* 93 /*
@@ -102,7 +100,7 @@ xfs_qm_quotactl(
102 */ 100 */
103 if (XFS_IS_QUOTA_ON(mp)) 101 if (XFS_IS_QUOTA_ON(mp))
104 return XFS_ERROR(EINVAL); 102 return XFS_ERROR(EINVAL);
105 if (vfsp->vfs_flag & VFS_RDONLY) 103 if (mp->m_flags & XFS_MOUNT_RDONLY)
106 return XFS_ERROR(EROFS); 104 return XFS_ERROR(EROFS);
107 return (xfs_qm_scall_trunc_qfiles(mp, 105 return (xfs_qm_scall_trunc_qfiles(mp,
108 xfs_qm_import_qtype_flags(*(uint *)addr))); 106 xfs_qm_import_qtype_flags(*(uint *)addr)));
@@ -118,13 +116,13 @@ xfs_qm_quotactl(
118 * QUOTAON - enabling quota enforcement. 116 * QUOTAON - enabling quota enforcement.
119 * Quota accounting must be turned on at mount time. 117 * Quota accounting must be turned on at mount time.
120 */ 118 */
121 if (vfsp->vfs_flag & VFS_RDONLY) 119 if (mp->m_flags & XFS_MOUNT_RDONLY)
122 return XFS_ERROR(EROFS); 120 return XFS_ERROR(EROFS);
123 return (xfs_qm_scall_quotaon(mp, 121 return (xfs_qm_scall_quotaon(mp,
124 xfs_qm_import_flags(*(uint *)addr))); 122 xfs_qm_import_flags(*(uint *)addr)));
125 123
126 case Q_XQUOTAOFF: 124 case Q_XQUOTAOFF:
127 if (vfsp->vfs_flag & VFS_RDONLY) 125 if (mp->m_flags & XFS_MOUNT_RDONLY)
128 return XFS_ERROR(EROFS); 126 return XFS_ERROR(EROFS);
129 break; 127 break;
130 128
@@ -140,7 +138,7 @@ xfs_qm_quotactl(
140 138
141 switch (cmd) { 139 switch (cmd) {
142 case Q_XQUOTAOFF: 140 case Q_XQUOTAOFF:
143 if (vfsp->vfs_flag & VFS_RDONLY) 141 if (mp->m_flags & XFS_MOUNT_RDONLY)
144 return XFS_ERROR(EROFS); 142 return XFS_ERROR(EROFS);
145 error = xfs_qm_scall_quotaoff(mp, 143 error = xfs_qm_scall_quotaoff(mp,
146 xfs_qm_import_flags(*(uint *)addr), 144 xfs_qm_import_flags(*(uint *)addr),
@@ -161,19 +159,19 @@ xfs_qm_quotactl(
161 break; 159 break;
162 160
163 case Q_XSETQLIM: 161 case Q_XSETQLIM:
164 if (vfsp->vfs_flag & VFS_RDONLY) 162 if (mp->m_flags & XFS_MOUNT_RDONLY)
165 return XFS_ERROR(EROFS); 163 return XFS_ERROR(EROFS);
166 error = xfs_qm_scall_setqlim(mp, (xfs_dqid_t)id, XFS_DQ_USER, 164 error = xfs_qm_scall_setqlim(mp, (xfs_dqid_t)id, XFS_DQ_USER,
167 (fs_disk_quota_t *)addr); 165 (fs_disk_quota_t *)addr);
168 break; 166 break;
169 case Q_XSETGQLIM: 167 case Q_XSETGQLIM:
170 if (vfsp->vfs_flag & VFS_RDONLY) 168 if (mp->m_flags & XFS_MOUNT_RDONLY)
171 return XFS_ERROR(EROFS); 169 return XFS_ERROR(EROFS);
172 error = xfs_qm_scall_setqlim(mp, (xfs_dqid_t)id, XFS_DQ_GROUP, 170 error = xfs_qm_scall_setqlim(mp, (xfs_dqid_t)id, XFS_DQ_GROUP,
173 (fs_disk_quota_t *)addr); 171 (fs_disk_quota_t *)addr);
174 break; 172 break;
175 case Q_XSETPQLIM: 173 case Q_XSETPQLIM:
176 if (vfsp->vfs_flag & VFS_RDONLY) 174 if (mp->m_flags & XFS_MOUNT_RDONLY)
177 return XFS_ERROR(EROFS); 175 return XFS_ERROR(EROFS);
178 error = xfs_qm_scall_setqlim(mp, (xfs_dqid_t)id, XFS_DQ_PROJ, 176 error = xfs_qm_scall_setqlim(mp, (xfs_dqid_t)id, XFS_DQ_PROJ,
179 (fs_disk_quota_t *)addr); 177 (fs_disk_quota_t *)addr);