summaryrefslogtreecommitdiff
path: root/fs/cifs
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2012-09-19 06:22:42 -0700
committerSteve French <smfrench@gmail.com>2012-09-24 21:46:32 -0500
commit71953fc6e4ce5ac05b594d8e5866accf531aa969 (patch)
tree3c26e6418eeac94c542ea1d29153f8dc6db3a006 /fs/cifs
parent5819575ec6b82345e1a21a960d381c699a91c700 (diff)
cifs: remove kmap lock and rsize limit
Now that we aren't abusing the kmap address space, there's no need for this lock or to impose a limit on the rsize. Signed-off-by: Jeff Layton <jlayton@redhat.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/cifsfs.c4
-rw-r--r--fs/cifs/cifsglob.h39
-rw-r--r--fs/cifs/smb1ops.c3
-rw-r--r--fs/cifs/smb2ops.c3
4 files changed, 0 insertions, 49 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index 4dda4890d776..3a3e2fee0b3e 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -88,10 +88,6 @@ extern mempool_t *cifs_mid_poolp;
struct workqueue_struct *cifsiod_wq;
-#ifdef CONFIG_HIGHMEM
-DEFINE_MUTEX(cifs_kmap_mutex);
-#endif
-
static int
cifs_read_super(struct super_block *sb)
{
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
index 79e8b6f06021..b2bb941d8ddd 100644
--- a/fs/cifs/cifsglob.h
+++ b/fs/cifs/cifsglob.h
@@ -638,45 +638,6 @@ get_next_mid(struct TCP_Server_Info *server)
#define CIFS_DEFAULT_NON_POSIX_WSIZE (65536)
/*
- * On hosts with high memory, we can't currently support wsize/rsize that are
- * larger than we can kmap at once. Cap the rsize/wsize at
- * LAST_PKMAP * PAGE_SIZE. We'll never be able to fill a read or write request
- * larger than that anyway.
- */
-#ifdef CONFIG_HIGHMEM
-#define CIFS_KMAP_SIZE_LIMIT (LAST_PKMAP * PAGE_CACHE_SIZE)
-#else /* CONFIG_HIGHMEM */
-#define CIFS_KMAP_SIZE_LIMIT (1<<24)
-#endif /* CONFIG_HIGHMEM */
-
-#ifdef CONFIG_HIGHMEM
-/*
- * On arches that have high memory, kmap address space is limited. By
- * serializing the kmap operations on those arches, we ensure that we don't
- * end up with a bunch of threads in writeback with partially mapped page
- * arrays, stuck waiting for kmap to come back. That situation prevents
- * progress and can deadlock.
- */
-
-extern struct mutex cifs_kmap_mutex;
-
-static inline void
-cifs_kmap_lock(void)
-{
- mutex_lock(&cifs_kmap_mutex);
-}
-
-static inline void
-cifs_kmap_unlock(void)
-{
- mutex_unlock(&cifs_kmap_mutex);
-}
-#else /* !CONFIG_HIGHMEM */
-#define cifs_kmap_lock() do { ; } while (0)
-#define cifs_kmap_unlock() do { ; } while (0)
-#endif /* CONFIG_HIGHMEM */
-
-/*
* Macros to allow the TCP_Server_Info->net field and related code to drop out
* when CONFIG_NET_NS isn't set.
*/
diff --git a/fs/cifs/smb1ops.c b/fs/cifs/smb1ops.c
index 8727ef712a3c..ed7f95532383 100644
--- a/fs/cifs/smb1ops.c
+++ b/fs/cifs/smb1ops.c
@@ -483,9 +483,6 @@ cifs_negotiate_rsize(struct cifs_tcon *tcon, struct smb_vol *volume_info)
if (!(server->capabilities & CAP_LARGE_READ_X))
rsize = min_t(unsigned int, CIFSMaxBufSize, rsize);
- /* limit to the amount that we can kmap at once */
- rsize = min_t(unsigned int, rsize, CIFS_KMAP_SIZE_LIMIT);
-
/* hard limit of CIFS_MAX_RSIZE */
rsize = min_t(unsigned int, rsize, CIFS_MAX_RSIZE);
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
index a621d6125367..b1dedf8cb372 100644
--- a/fs/cifs/smb2ops.c
+++ b/fs/cifs/smb2ops.c
@@ -205,9 +205,6 @@ smb2_negotiate_rsize(struct cifs_tcon *tcon, struct smb_vol *volume_info)
*/
rsize = min_t(unsigned int, rsize, 2 << 15);
- /* limit to the amount that we can kmap at once */
- rsize = min_t(unsigned int, rsize, CIFS_KMAP_SIZE_LIMIT);
-
return rsize;
}