aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/xfs/Makefile-linux-2.61
-rw-r--r--fs/xfs/linux-2.6/xfs_linux.h1
-rw-r--r--fs/xfs/support/move.c51
-rw-r--r--fs/xfs/support/move.h70
4 files changed, 0 insertions, 123 deletions
diff --git a/fs/xfs/Makefile-linux-2.6 b/fs/xfs/Makefile-linux-2.6
index e7a9a83f0087..6d48a5ed38f3 100644
--- a/fs/xfs/Makefile-linux-2.6
+++ b/fs/xfs/Makefile-linux-2.6
@@ -114,7 +114,6 @@ xfs-y += $(addprefix $(XFS_LINUX)/, \
114# Objects in support/ 114# Objects in support/
115xfs-y += $(addprefix support/, \ 115xfs-y += $(addprefix support/, \
116 debug.o \ 116 debug.o \
117 move.o \
118 uuid.o) 117 uuid.o)
119 118
120xfs-$(CONFIG_XFS_TRACE) += support/ktrace.o 119xfs-$(CONFIG_XFS_TRACE) += support/ktrace.o
diff --git a/fs/xfs/linux-2.6/xfs_linux.h b/fs/xfs/linux-2.6/xfs_linux.h
index 5617f3de4ff6..ab634a775d23 100644
--- a/fs/xfs/linux-2.6/xfs_linux.h
+++ b/fs/xfs/linux-2.6/xfs_linux.h
@@ -51,7 +51,6 @@
51 51
52#include <support/ktrace.h> 52#include <support/ktrace.h>
53#include <support/debug.h> 53#include <support/debug.h>
54#include <support/move.h>
55#include <support/uuid.h> 54#include <support/uuid.h>
56 55
57#include <linux/mm.h> 56#include <linux/mm.h>
diff --git a/fs/xfs/support/move.c b/fs/xfs/support/move.c
deleted file mode 100644
index ac8617ca3909..000000000000
--- a/fs/xfs/support/move.c
+++ /dev/null
@@ -1,51 +0,0 @@
1/*
2 * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc.
3 * All Rights Reserved.
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it would be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write the Free Software Foundation,
16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18#include <xfs.h>
19
20/* Read from kernel buffer at src to user/kernel buffer defined
21 * by the uio structure. Advance the pointer in the uio struct
22 * as we go.
23 */
24int
25xfs_uio_read(caddr_t src, size_t len, struct uio *uio)
26{
27 size_t count;
28
29 if (!len || !uio->uio_resid)
30 return 0;
31
32 count = uio->uio_iov->iov_len;
33 if (!count)
34 return 0;
35 if (count > len)
36 count = len;
37
38 if (uio->uio_segflg == UIO_USERSPACE) {
39 if (copy_to_user(uio->uio_iov->iov_base, src, count))
40 return EFAULT;
41 } else {
42 ASSERT(uio->uio_segflg == UIO_SYSSPACE);
43 memcpy(uio->uio_iov->iov_base, src, count);
44 }
45
46 uio->uio_iov->iov_base = (void*)((char*)uio->uio_iov->iov_base + count);
47 uio->uio_iov->iov_len -= count;
48 uio->uio_offset += count;
49 uio->uio_resid -= count;
50 return 0;
51}
diff --git a/fs/xfs/support/move.h b/fs/xfs/support/move.h
deleted file mode 100644
index 324e413deadd..000000000000
--- a/fs/xfs/support/move.h
+++ /dev/null
@@ -1,70 +0,0 @@
1/*
2 * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc.
3 * All Rights Reserved.
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it would be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write the Free Software Foundation,
16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 *
18 * Portions Copyright (c) 1982, 1986, 1993, 1994
19 * The Regents of the University of California. All rights reserved.
20 *
21 * Redistribution and use in source and binary forms, with or without
22 * modification, are permitted provided that the following conditions
23 * are met:
24 * 1. Redistributions of source code must retain the above copyright
25 * notice, this list of conditions and the following disclaimer.
26 * 2. Redistributions in binary form must reproduce the above copyright
27 * notice, this list of conditions and the following disclaimer in the
28 * documentation and/or other materials provided with the distribution.
29 * 3. Neither the name of the University nor the names of its contributors
30 * may be used to endorse or promote products derived from this software
31 * without specific prior written permission.
32 *
33 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
34 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
35 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
36 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
37 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
38 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
39 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
40 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
41 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
42 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
43 * SUCH DAMAGE.
44 */
45#ifndef __XFS_SUPPORT_MOVE_H__
46#define __XFS_SUPPORT_MOVE_H__
47
48#include <linux/uio.h>
49#include <asm/uaccess.h>
50
51/* Segment flag values. */
52enum uio_seg {
53 UIO_USERSPACE, /* from user data space */
54 UIO_SYSSPACE, /* from system space */
55};
56
57struct uio {
58 struct kvec *uio_iov; /* pointer to array of iovecs */
59 int uio_iovcnt; /* number of iovecs in array */
60 xfs_off_t uio_offset; /* offset in file this uio corresponds to */
61 int uio_resid; /* residual i/o count */
62 enum uio_seg uio_segflg; /* see above */
63};
64
65typedef struct uio uio_t;
66typedef struct kvec iovec_t;
67
68extern int xfs_uio_read (caddr_t, size_t, uio_t *);
69
70#endif /* __XFS_SUPPORT_MOVE_H__ */