diff options
Diffstat (limited to 'fs/cifs/cifsfs.c')
-rw-r--r-- | fs/cifs/cifsfs.c | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index 8219c02145a7..d4b713e5affb 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
@@ -476,7 +476,7 @@ cifs_get_sb(struct file_system_type *fs_type, | |||
476 | 476 | ||
477 | sb->s_flags = flags; | 477 | sb->s_flags = flags; |
478 | 478 | ||
479 | rc = cifs_read_super(sb, data, dev_name, flags & MS_VERBOSE ? 1 : 0); | 479 | rc = cifs_read_super(sb, data, dev_name, flags & MS_SILENT ? 1 : 0); |
480 | if (rc) { | 480 | if (rc) { |
481 | up_write(&sb->s_umount); | 481 | up_write(&sb->s_umount); |
482 | deactivate_super(sb); | 482 | deactivate_super(sb); |
@@ -580,7 +580,7 @@ struct inode_operations cifs_symlink_inode_ops = { | |||
580 | #endif | 580 | #endif |
581 | }; | 581 | }; |
582 | 582 | ||
583 | struct file_operations cifs_file_ops = { | 583 | const struct file_operations cifs_file_ops = { |
584 | .read = do_sync_read, | 584 | .read = do_sync_read, |
585 | .write = do_sync_write, | 585 | .write = do_sync_write, |
586 | .readv = generic_file_readv, | 586 | .readv = generic_file_readv, |
@@ -604,7 +604,7 @@ struct file_operations cifs_file_ops = { | |||
604 | #endif /* CONFIG_CIFS_EXPERIMENTAL */ | 604 | #endif /* CONFIG_CIFS_EXPERIMENTAL */ |
605 | }; | 605 | }; |
606 | 606 | ||
607 | struct file_operations cifs_file_direct_ops = { | 607 | const struct file_operations cifs_file_direct_ops = { |
608 | /* no mmap, no aio, no readv - | 608 | /* no mmap, no aio, no readv - |
609 | BB reevaluate whether they can be done with directio, no cache */ | 609 | BB reevaluate whether they can be done with directio, no cache */ |
610 | .read = cifs_user_read, | 610 | .read = cifs_user_read, |
@@ -623,7 +623,7 @@ struct file_operations cifs_file_direct_ops = { | |||
623 | .dir_notify = cifs_dir_notify, | 623 | .dir_notify = cifs_dir_notify, |
624 | #endif /* CONFIG_CIFS_EXPERIMENTAL */ | 624 | #endif /* CONFIG_CIFS_EXPERIMENTAL */ |
625 | }; | 625 | }; |
626 | struct file_operations cifs_file_nobrl_ops = { | 626 | const struct file_operations cifs_file_nobrl_ops = { |
627 | .read = do_sync_read, | 627 | .read = do_sync_read, |
628 | .write = do_sync_write, | 628 | .write = do_sync_write, |
629 | .readv = generic_file_readv, | 629 | .readv = generic_file_readv, |
@@ -646,7 +646,7 @@ struct file_operations cifs_file_nobrl_ops = { | |||
646 | #endif /* CONFIG_CIFS_EXPERIMENTAL */ | 646 | #endif /* CONFIG_CIFS_EXPERIMENTAL */ |
647 | }; | 647 | }; |
648 | 648 | ||
649 | struct file_operations cifs_file_direct_nobrl_ops = { | 649 | const struct file_operations cifs_file_direct_nobrl_ops = { |
650 | /* no mmap, no aio, no readv - | 650 | /* no mmap, no aio, no readv - |
651 | BB reevaluate whether they can be done with directio, no cache */ | 651 | BB reevaluate whether they can be done with directio, no cache */ |
652 | .read = cifs_user_read, | 652 | .read = cifs_user_read, |
@@ -665,7 +665,7 @@ struct file_operations cifs_file_direct_nobrl_ops = { | |||
665 | #endif /* CONFIG_CIFS_EXPERIMENTAL */ | 665 | #endif /* CONFIG_CIFS_EXPERIMENTAL */ |
666 | }; | 666 | }; |
667 | 667 | ||
668 | struct file_operations cifs_dir_ops = { | 668 | const struct file_operations cifs_dir_ops = { |
669 | .readdir = cifs_readdir, | 669 | .readdir = cifs_readdir, |
670 | .release = cifs_closedir, | 670 | .release = cifs_closedir, |
671 | .read = generic_read_dir, | 671 | .read = generic_read_dir, |
@@ -692,7 +692,8 @@ cifs_init_inodecache(void) | |||
692 | { | 692 | { |
693 | cifs_inode_cachep = kmem_cache_create("cifs_inode_cache", | 693 | cifs_inode_cachep = kmem_cache_create("cifs_inode_cache", |
694 | sizeof (struct cifsInodeInfo), | 694 | sizeof (struct cifsInodeInfo), |
695 | 0, SLAB_RECLAIM_ACCOUNT, | 695 | 0, (SLAB_RECLAIM_ACCOUNT| |
696 | SLAB_MEM_SPREAD), | ||
696 | cifs_init_once, NULL); | 697 | cifs_init_once, NULL); |
697 | if (cifs_inode_cachep == NULL) | 698 | if (cifs_inode_cachep == NULL) |
698 | return -ENOMEM; | 699 | return -ENOMEM; |
@@ -734,10 +735,8 @@ cifs_init_request_bufs(void) | |||
734 | cERROR(1,("cifs_min_rcv set to maximum (64)")); | 735 | cERROR(1,("cifs_min_rcv set to maximum (64)")); |
735 | } | 736 | } |
736 | 737 | ||
737 | cifs_req_poolp = mempool_create(cifs_min_rcv, | 738 | cifs_req_poolp = mempool_create_slab_pool(cifs_min_rcv, |
738 | mempool_alloc_slab, | 739 | cifs_req_cachep); |
739 | mempool_free_slab, | ||
740 | cifs_req_cachep); | ||
741 | 740 | ||
742 | if(cifs_req_poolp == NULL) { | 741 | if(cifs_req_poolp == NULL) { |
743 | kmem_cache_destroy(cifs_req_cachep); | 742 | kmem_cache_destroy(cifs_req_cachep); |
@@ -767,10 +766,8 @@ cifs_init_request_bufs(void) | |||
767 | cFYI(1,("cifs_min_small set to maximum (256)")); | 766 | cFYI(1,("cifs_min_small set to maximum (256)")); |
768 | } | 767 | } |
769 | 768 | ||
770 | cifs_sm_req_poolp = mempool_create(cifs_min_small, | 769 | cifs_sm_req_poolp = mempool_create_slab_pool(cifs_min_small, |
771 | mempool_alloc_slab, | 770 | cifs_sm_req_cachep); |
772 | mempool_free_slab, | ||
773 | cifs_sm_req_cachep); | ||
774 | 771 | ||
775 | if(cifs_sm_req_poolp == NULL) { | 772 | if(cifs_sm_req_poolp == NULL) { |
776 | mempool_destroy(cifs_req_poolp); | 773 | mempool_destroy(cifs_req_poolp); |
@@ -804,10 +801,8 @@ cifs_init_mids(void) | |||
804 | if (cifs_mid_cachep == NULL) | 801 | if (cifs_mid_cachep == NULL) |
805 | return -ENOMEM; | 802 | return -ENOMEM; |
806 | 803 | ||
807 | cifs_mid_poolp = mempool_create(3 /* a reasonable min simultan opers */, | 804 | /* 3 is a reasonable minimum number of simultaneous operations */ |
808 | mempool_alloc_slab, | 805 | cifs_mid_poolp = mempool_create_slab_pool(3, cifs_mid_cachep); |
809 | mempool_free_slab, | ||
810 | cifs_mid_cachep); | ||
811 | if(cifs_mid_poolp == NULL) { | 806 | if(cifs_mid_poolp == NULL) { |
812 | kmem_cache_destroy(cifs_mid_cachep); | 807 | kmem_cache_destroy(cifs_mid_cachep); |
813 | return -ENOMEM; | 808 | return -ENOMEM; |