diff options
-rw-r--r-- | fs/ocfs2/dlm/dlmfs.c | 6 | ||||
-rw-r--r-- | fs/ocfs2/dlm/dlmlock.c | 4 | ||||
-rw-r--r-- | fs/ocfs2/dlm/dlmmaster.c | 16 | ||||
-rw-r--r-- | fs/ocfs2/dlm/dlmrecovery.c | 10 | ||||
-rw-r--r-- | fs/ocfs2/dlm/userdlm.c | 2 |
5 files changed, 19 insertions, 19 deletions
diff --git a/fs/ocfs2/dlm/dlmfs.c b/fs/ocfs2/dlm/dlmfs.c index 7273d9fa6bab..033ad1701232 100644 --- a/fs/ocfs2/dlm/dlmfs.c +++ b/fs/ocfs2/dlm/dlmfs.c | |||
@@ -116,7 +116,7 @@ static int dlmfs_file_open(struct inode *inode, | |||
116 | * doesn't make sense for LVB writes. */ | 116 | * doesn't make sense for LVB writes. */ |
117 | file->f_flags &= ~O_APPEND; | 117 | file->f_flags &= ~O_APPEND; |
118 | 118 | ||
119 | fp = kmalloc(sizeof(*fp), GFP_KERNEL); | 119 | fp = kmalloc(sizeof(*fp), GFP_NOFS); |
120 | if (!fp) { | 120 | if (!fp) { |
121 | status = -ENOMEM; | 121 | status = -ENOMEM; |
122 | goto bail; | 122 | goto bail; |
@@ -196,7 +196,7 @@ static ssize_t dlmfs_file_read(struct file *filp, | |||
196 | else | 196 | else |
197 | readlen = count - *ppos; | 197 | readlen = count - *ppos; |
198 | 198 | ||
199 | lvb_buf = kmalloc(readlen, GFP_KERNEL); | 199 | lvb_buf = kmalloc(readlen, GFP_NOFS); |
200 | if (!lvb_buf) | 200 | if (!lvb_buf) |
201 | return -ENOMEM; | 201 | return -ENOMEM; |
202 | 202 | ||
@@ -240,7 +240,7 @@ static ssize_t dlmfs_file_write(struct file *filp, | |||
240 | else | 240 | else |
241 | writelen = count - *ppos; | 241 | writelen = count - *ppos; |
242 | 242 | ||
243 | lvb_buf = kmalloc(writelen, GFP_KERNEL); | 243 | lvb_buf = kmalloc(writelen, GFP_NOFS); |
244 | if (!lvb_buf) | 244 | if (!lvb_buf) |
245 | return -ENOMEM; | 245 | return -ENOMEM; |
246 | 246 | ||
diff --git a/fs/ocfs2/dlm/dlmlock.c b/fs/ocfs2/dlm/dlmlock.c index 20b38dc18736..e3cab0e48503 100644 --- a/fs/ocfs2/dlm/dlmlock.c +++ b/fs/ocfs2/dlm/dlmlock.c | |||
@@ -408,13 +408,13 @@ struct dlm_lock * dlm_new_lock(int type, u8 node, u64 cookie, | |||
408 | struct dlm_lock *lock; | 408 | struct dlm_lock *lock; |
409 | int kernel_allocated = 0; | 409 | int kernel_allocated = 0; |
410 | 410 | ||
411 | lock = kcalloc(1, sizeof(*lock), GFP_KERNEL); | 411 | lock = kcalloc(1, sizeof(*lock), GFP_NOFS); |
412 | if (!lock) | 412 | if (!lock) |
413 | return NULL; | 413 | return NULL; |
414 | 414 | ||
415 | if (!lksb) { | 415 | if (!lksb) { |
416 | /* zero memory only if kernel-allocated */ | 416 | /* zero memory only if kernel-allocated */ |
417 | lksb = kcalloc(1, sizeof(*lksb), GFP_KERNEL); | 417 | lksb = kcalloc(1, sizeof(*lksb), GFP_NOFS); |
418 | if (!lksb) { | 418 | if (!lksb) { |
419 | kfree(lock); | 419 | kfree(lock); |
420 | return NULL; | 420 | return NULL; |
diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c index ed1601d1831c..b780e159dad2 100644 --- a/fs/ocfs2/dlm/dlmmaster.c +++ b/fs/ocfs2/dlm/dlmmaster.c | |||
@@ -709,11 +709,11 @@ struct dlm_lock_resource *dlm_new_lockres(struct dlm_ctxt *dlm, | |||
709 | { | 709 | { |
710 | struct dlm_lock_resource *res; | 710 | struct dlm_lock_resource *res; |
711 | 711 | ||
712 | res = kmalloc(sizeof(struct dlm_lock_resource), GFP_KERNEL); | 712 | res = kmalloc(sizeof(struct dlm_lock_resource), GFP_NOFS); |
713 | if (!res) | 713 | if (!res) |
714 | return NULL; | 714 | return NULL; |
715 | 715 | ||
716 | res->lockname.name = kmalloc(namelen, GFP_KERNEL); | 716 | res->lockname.name = kmalloc(namelen, GFP_NOFS); |
717 | if (!res->lockname.name) { | 717 | if (!res->lockname.name) { |
718 | kfree(res); | 718 | kfree(res); |
719 | return NULL; | 719 | return NULL; |
@@ -777,7 +777,7 @@ lookup: | |||
777 | mlog(0, "allocating a new resource\n"); | 777 | mlog(0, "allocating a new resource\n"); |
778 | /* nothing found and we need to allocate one. */ | 778 | /* nothing found and we need to allocate one. */ |
779 | alloc_mle = (struct dlm_master_list_entry *) | 779 | alloc_mle = (struct dlm_master_list_entry *) |
780 | kmem_cache_alloc(dlm_mle_cache, GFP_KERNEL); | 780 | kmem_cache_alloc(dlm_mle_cache, GFP_NOFS); |
781 | if (!alloc_mle) | 781 | if (!alloc_mle) |
782 | goto leave; | 782 | goto leave; |
783 | res = dlm_new_lockres(dlm, lockid, namelen); | 783 | res = dlm_new_lockres(dlm, lockid, namelen); |
@@ -1532,7 +1532,7 @@ way_up_top: | |||
1532 | spin_unlock(&dlm->spinlock); | 1532 | spin_unlock(&dlm->spinlock); |
1533 | 1533 | ||
1534 | mle = (struct dlm_master_list_entry *) | 1534 | mle = (struct dlm_master_list_entry *) |
1535 | kmem_cache_alloc(dlm_mle_cache, GFP_KERNEL); | 1535 | kmem_cache_alloc(dlm_mle_cache, GFP_NOFS); |
1536 | if (!mle) { | 1536 | if (!mle) { |
1537 | response = DLM_MASTER_RESP_ERROR; | 1537 | response = DLM_MASTER_RESP_ERROR; |
1538 | mlog_errno(-ENOMEM); | 1538 | mlog_errno(-ENOMEM); |
@@ -1940,7 +1940,7 @@ int dlm_dispatch_assert_master(struct dlm_ctxt *dlm, | |||
1940 | int ignore_higher, u8 request_from, u32 flags) | 1940 | int ignore_higher, u8 request_from, u32 flags) |
1941 | { | 1941 | { |
1942 | struct dlm_work_item *item; | 1942 | struct dlm_work_item *item; |
1943 | item = kcalloc(1, sizeof(*item), GFP_KERNEL); | 1943 | item = kcalloc(1, sizeof(*item), GFP_NOFS); |
1944 | if (!item) | 1944 | if (!item) |
1945 | return -ENOMEM; | 1945 | return -ENOMEM; |
1946 | 1946 | ||
@@ -2175,14 +2175,14 @@ int dlm_migrate_lockres(struct dlm_ctxt *dlm, struct dlm_lock_resource *res, | |||
2175 | */ | 2175 | */ |
2176 | 2176 | ||
2177 | ret = -ENOMEM; | 2177 | ret = -ENOMEM; |
2178 | mres = (struct dlm_migratable_lockres *) __get_free_page(GFP_KERNEL); | 2178 | mres = (struct dlm_migratable_lockres *) __get_free_page(GFP_NOFS); |
2179 | if (!mres) { | 2179 | if (!mres) { |
2180 | mlog_errno(ret); | 2180 | mlog_errno(ret); |
2181 | goto leave; | 2181 | goto leave; |
2182 | } | 2182 | } |
2183 | 2183 | ||
2184 | mle = (struct dlm_master_list_entry *) kmem_cache_alloc(dlm_mle_cache, | 2184 | mle = (struct dlm_master_list_entry *) kmem_cache_alloc(dlm_mle_cache, |
2185 | GFP_KERNEL); | 2185 | GFP_NOFS); |
2186 | if (!mle) { | 2186 | if (!mle) { |
2187 | mlog_errno(ret); | 2187 | mlog_errno(ret); |
2188 | goto leave; | 2188 | goto leave; |
@@ -2639,7 +2639,7 @@ int dlm_migrate_request_handler(struct o2net_msg *msg, u32 len, void *data) | |||
2639 | 2639 | ||
2640 | /* preallocate.. if this fails, abort */ | 2640 | /* preallocate.. if this fails, abort */ |
2641 | mle = (struct dlm_master_list_entry *) kmem_cache_alloc(dlm_mle_cache, | 2641 | mle = (struct dlm_master_list_entry *) kmem_cache_alloc(dlm_mle_cache, |
2642 | GFP_KERNEL); | 2642 | GFP_NOFS); |
2643 | 2643 | ||
2644 | if (!mle) { | 2644 | if (!mle) { |
2645 | ret = -ENOMEM; | 2645 | ret = -ENOMEM; |
diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c index b03fecab299d..f76b498a1745 100644 --- a/fs/ocfs2/dlm/dlmrecovery.c +++ b/fs/ocfs2/dlm/dlmrecovery.c | |||
@@ -737,7 +737,7 @@ static int dlm_init_recovery_area(struct dlm_ctxt *dlm, u8 dead_node) | |||
737 | } | 737 | } |
738 | BUG_ON(num == dead_node); | 738 | BUG_ON(num == dead_node); |
739 | 739 | ||
740 | ndata = kcalloc(1, sizeof(*ndata), GFP_KERNEL); | 740 | ndata = kcalloc(1, sizeof(*ndata), GFP_NOFS); |
741 | if (!ndata) { | 741 | if (!ndata) { |
742 | dlm_destroy_recovery_area(dlm, dead_node); | 742 | dlm_destroy_recovery_area(dlm, dead_node); |
743 | return -ENOMEM; | 743 | return -ENOMEM; |
@@ -822,14 +822,14 @@ int dlm_request_all_locks_handler(struct o2net_msg *msg, u32 len, void *data) | |||
822 | } | 822 | } |
823 | BUG_ON(lr->dead_node != dlm->reco.dead_node); | 823 | BUG_ON(lr->dead_node != dlm->reco.dead_node); |
824 | 824 | ||
825 | item = kcalloc(1, sizeof(*item), GFP_KERNEL); | 825 | item = kcalloc(1, sizeof(*item), GFP_NOFS); |
826 | if (!item) { | 826 | if (!item) { |
827 | dlm_put(dlm); | 827 | dlm_put(dlm); |
828 | return -ENOMEM; | 828 | return -ENOMEM; |
829 | } | 829 | } |
830 | 830 | ||
831 | /* this will get freed by dlm_request_all_locks_worker */ | 831 | /* this will get freed by dlm_request_all_locks_worker */ |
832 | buf = (char *) __get_free_page(GFP_KERNEL); | 832 | buf = (char *) __get_free_page(GFP_NOFS); |
833 | if (!buf) { | 833 | if (!buf) { |
834 | kfree(item); | 834 | kfree(item); |
835 | dlm_put(dlm); | 835 | dlm_put(dlm); |
@@ -1302,8 +1302,8 @@ int dlm_mig_lockres_handler(struct o2net_msg *msg, u32 len, void *data) | |||
1302 | mlog(0, "all done flag. all lockres data received!\n"); | 1302 | mlog(0, "all done flag. all lockres data received!\n"); |
1303 | 1303 | ||
1304 | ret = -ENOMEM; | 1304 | ret = -ENOMEM; |
1305 | buf = kmalloc(be16_to_cpu(msg->data_len), GFP_KERNEL); | 1305 | buf = kmalloc(be16_to_cpu(msg->data_len), GFP_NOFS); |
1306 | item = kcalloc(1, sizeof(*item), GFP_KERNEL); | 1306 | item = kcalloc(1, sizeof(*item), GFP_NOFS); |
1307 | if (!buf || !item) | 1307 | if (!buf || !item) |
1308 | goto leave; | 1308 | goto leave; |
1309 | 1309 | ||
diff --git a/fs/ocfs2/dlm/userdlm.c b/fs/ocfs2/dlm/userdlm.c index 74ca4e5f9765..e641b084b343 100644 --- a/fs/ocfs2/dlm/userdlm.c +++ b/fs/ocfs2/dlm/userdlm.c | |||
@@ -672,7 +672,7 @@ struct dlm_ctxt *user_dlm_register_context(struct qstr *name) | |||
672 | u32 dlm_key; | 672 | u32 dlm_key; |
673 | char *domain; | 673 | char *domain; |
674 | 674 | ||
675 | domain = kmalloc(name->len + 1, GFP_KERNEL); | 675 | domain = kmalloc(name->len + 1, GFP_NOFS); |
676 | if (!domain) { | 676 | if (!domain) { |
677 | mlog_errno(-ENOMEM); | 677 | mlog_errno(-ENOMEM); |
678 | return ERR_PTR(-ENOMEM); | 678 | return ERR_PTR(-ENOMEM); |