aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_ioctl.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2007-09-14 01:22:37 -0400
committerTim Shimmin <tes@chook.melbourne.sgi.com>2007-10-19 04:02:55 -0400
commitc6143911a7e0f8abef0319c801eb36718f57dfde (patch)
tree86138962b153b617b5c117797394e23337f979c7 /fs/xfs/linux-2.6/xfs_ioctl.c
parentc8fcfac5a257f8a04f7ba3d397dedccffef19be2 (diff)
[XFS] cleanup fid types mess
Currently XFs has three different fid types: struct fid, struct xfs_fid and struct xfs_fid2 with hte latter two beeing identicaly and the first one beeing the same size but an unstructured array with the same size. This patch consolidates all this to alway uuse struct xfs_fid. This patch is required for an upcoming patch series from me that revamps the nfs exporting code and introduces a Linux-wide struct fid. SGI-PV: 970336 SGI-Modid: xfs-linux-melb:xfs-kern:29651a Signed-off-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com> Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_ioctl.c')
-rw-r--r--fs/xfs/linux-2.6/xfs_ioctl.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/fs/xfs/linux-2.6/xfs_ioctl.c b/fs/xfs/linux-2.6/xfs_ioctl.c
index ffec630e7db7..2b34bad48b07 100644
--- a/fs/xfs/linux-2.6/xfs_ioctl.c
+++ b/fs/xfs/linux-2.6/xfs_ioctl.c
@@ -152,11 +152,11 @@ xfs_find_handle(
152 lock_mode = xfs_ilock_map_shared(ip); 152 lock_mode = xfs_ilock_map_shared(ip);
153 153
154 /* fill in fid section of handle from inode */ 154 /* fill in fid section of handle from inode */
155 handle.ha_fid.xfs_fid_len = sizeof(xfs_fid_t) - 155 handle.ha_fid.fid_len = sizeof(xfs_fid_t) -
156 sizeof(handle.ha_fid.xfs_fid_len); 156 sizeof(handle.ha_fid.fid_len);
157 handle.ha_fid.xfs_fid_pad = 0; 157 handle.ha_fid.fid_pad = 0;
158 handle.ha_fid.xfs_fid_gen = ip->i_d.di_gen; 158 handle.ha_fid.fid_gen = ip->i_d.di_gen;
159 handle.ha_fid.xfs_fid_ino = ip->i_ino; 159 handle.ha_fid.fid_ino = ip->i_ino;
160 160
161 xfs_iunlock_map_shared(ip, lock_mode); 161 xfs_iunlock_map_shared(ip, lock_mode);
162 162
@@ -222,10 +222,10 @@ xfs_vget_fsop_handlereq(
222 if (hlen < sizeof(*handlep)) 222 if (hlen < sizeof(*handlep))
223 memset(((char *)handlep) + hlen, 0, sizeof(*handlep) - hlen); 223 memset(((char *)handlep) + hlen, 0, sizeof(*handlep) - hlen);
224 if (hlen > sizeof(handlep->ha_fsid)) { 224 if (hlen > sizeof(handlep->ha_fsid)) {
225 if (handlep->ha_fid.xfs_fid_len != 225 if (handlep->ha_fid.fid_len !=
226 (hlen - sizeof(handlep->ha_fsid) 226 (hlen - sizeof(handlep->ha_fsid) -
227 - sizeof(handlep->ha_fid.xfs_fid_len)) 227 sizeof(handlep->ha_fid.fid_len)) ||
228 || handlep->ha_fid.xfs_fid_pad) 228 handlep->ha_fid.fid_pad)
229 return XFS_ERROR(EINVAL); 229 return XFS_ERROR(EINVAL);
230 } 230 }
231 231
@@ -233,9 +233,9 @@ xfs_vget_fsop_handlereq(
233 * Crack the handle, obtain the inode # & generation # 233 * Crack the handle, obtain the inode # & generation #
234 */ 234 */
235 xfid = (struct xfs_fid *)&handlep->ha_fid; 235 xfid = (struct xfs_fid *)&handlep->ha_fid;
236 if (xfid->xfs_fid_len == sizeof(*xfid) - sizeof(xfid->xfs_fid_len)) { 236 if (xfid->fid_len == sizeof(*xfid) - sizeof(xfid->fid_len)) {
237 ino = xfid->xfs_fid_ino; 237 ino = xfid->fid_ino;
238 igen = xfid->xfs_fid_gen; 238 igen = xfid->fid_gen;
239 } else { 239 } else {
240 return XFS_ERROR(EINVAL); 240 return XFS_ERROR(EINVAL);
241 } 241 }