Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 326301
b: refs/heads/master
c: 71953fc
h: refs/heads/master
i:
  326299: c3dbf9a
v: v3
  • Loading branch information
Jeff Layton authored and Steve French committed Sep 25, 2012
1 parent e5eb39c commit b937942
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 50 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5819575ec6b82345e1a21a960d381c699a91c700
refs/heads/master: 71953fc6e4ce5ac05b594d8e5866accf531aa969
4 changes: 0 additions & 4 deletions trunk/fs/cifs/cifsfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
39 changes: 0 additions & 39 deletions trunk/fs/cifs/cifsglob.h
Original file line number Diff line number Diff line change
Expand Up @@ -637,45 +637,6 @@ get_next_mid(struct TCP_Server_Info *server)
#define CIFS_DEFAULT_NON_POSIX_RSIZE (60 * 1024)
#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.
Expand Down
3 changes: 0 additions & 3 deletions trunk/fs/cifs/smb1ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
3 changes: 0 additions & 3 deletions trunk/fs/cifs/smb2ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit b937942

Please sign in to comment.