On Tue, 2007-09-18 at 19:19 -0700, Andrew Morton wrote:Here is the patch to clean up __GFP_NOFAIL flag in jbd/jbd2. In all cases except one handles memory allocation failure so I get rid of those GFP_NOFAIL flags. Also, shouldn't we use GFP_KERNEL instead of GFP_NOFS flag for kmalloc in jbd/jbd2? I will send a separate patch to cleanup that. Signed-off-by: Mingming Cao <cmm@us.ibm.com> --- fs/jbd/journal.c | 2 +- fs/jbd/transaction.c | 3 +-- fs/jbd2/journal.c | 2 +- fs/jbd2/transaction.c | 3 +-- 4 files changed, 4 insertions(+), 6 deletions(-) Index: linux-2.6.23-rc6/fs/jbd/journal.c =================================================================== --- linux-2.6.23-rc6.orig/fs/jbd/journal.c 2007-09-19 11:47:58.000000000 -0700 +++ linux-2.6.23-rc6/fs/jbd/journal.c 2007-09-19 11:48:40.000000000 -0700 @@ -653,7 +653,7 @@ static journal_t * journal_init_common ( journal_t *journal; int err; - journal = kmalloc(sizeof(*journal), GFP_KERNEL|__GFP_NOFAIL); + journal = kmalloc(sizeof(*journal), GFP_KERNEL); if (!journal) goto fail; memset(journal, 0, sizeof(*journal)); Index: linux-2.6.23-rc6/fs/jbd/transaction.c =================================================================== --- linux-2.6.23-rc6.orig/fs/jbd/transaction.c 2007-09-19 11:48:05.000000000 -0700 +++ linux-2.6.23-rc6/fs/jbd/transaction.c 2007-09-19 11:49:10.000000000 -0700 @@ -96,8 +96,7 @@ static int start_this_handle(journal_t * alloc_transaction: if (!journal->j_running_transaction) { - new_transaction = kmalloc(sizeof(*new_transaction), - GFP_NOFS|__GFP_NOFAIL); + new_transaction = kmalloc(sizeof(*new_transaction), GFP_NOFS); if (!new_transaction) { ret = -ENOMEM; goto out; Index: linux-2.6.23-rc6/fs/jbd2/journal.c =================================================================== --- linux-2.6.23-rc6.orig/fs/jbd2/journal.c 2007-09-19 11:48:14.000000000 -0700 +++ linux-2.6.23-rc6/fs/jbd2/journal.c 2007-09-19 11:49:46.000000000 -0700 @@ -654,7 +654,7 @@ static journal_t * journal_init_common ( journal_t *journal; int err; - journal = kmalloc(sizeof(*journal), GFP_KERNEL|__GFP_NOFAIL); + journal = kmalloc(sizeof(*journal), GFP_KERNEL); if (!journal) goto fail; memset(journal, 0, sizeof(*journal)); Index: linux-2.6.23-rc6/fs/jbd2/transaction.c =================================================================== --- linux-2.6.23-rc6.orig/fs/jbd2/transaction.c 2007-09-19 11:48:08.000000000 -0700 +++ linux-2.6.23-rc6/fs/jbd2/transaction.c 2007-09-19 11:50:12.000000000 -0700 @@ -96,8 +96,7 @@ static int start_this_handle(journal_t * alloc_transaction: if (!journal->j_running_transaction) { - new_transaction = kmalloc(sizeof(*new_transaction), - GFP_NOFS|__GFP_NOFAIL); + new_transaction = kmalloc(sizeof(*new_transaction), GFP_NOFS); if (!new_transaction) { ret = -ENOMEM; goto out; -
| Eric Sandeen | Re: [RFC] Heads up on sys_fallocate() |
| Linus Torvalds | Linux 2.6.27 |
| Cornelia Huck | Re: 2.6.22-rc3-mm1 |
| Andi Kleen | [PATCH for review] [6/48] x86: trim memory not covered by WB MTRRs |
| Linux Kernel Mailing List | i.MX3: make SoC devices globally available |
| Linux Kernel Mailing List | MXC: Remove WD IRQ priority setting |
| Linux Kernel Mailing List | ARM: DaVinci: i2c setup |
| Linux Kernel Mailing List | [MACVLAN]: Update Kconfig to refer to iproute |
git: | |
| Sverre Rabbelier | Git vs Monotone |
| Jakub Narebski | Re: [RFC] origin link for cherry-pick and revert |
| Jan-Benedict Glaw | Re: Errors GITtifying GCC and Binutils |
| H. Peter Anvin | Re: tip tree clone fail |
| jamal | Re: [PATCH 0/10 REV5] Implement skb batching and support in IPoIB/E1000 |
| KOVACS Krisztian | [net-next PATCH 01/16] Loosen source address check on IPv4 output |
| Ilpo Järvinen | Re: [bug] stuck localhost TCP connections, v2.6.26-rc3+ |
| Andrew Bird (Sphere Systems) | Re: [RFC] Patch to option HSO driver to the kernel |
| sata/ide timeout errors on asus server-mb | 1 hour ago | Linux kernel |
| Shared swap partition | 2 hours ago | Linux general |
| usb mic not detected | 6 hours ago | Applications and Utilities |
| Problem in Inserting a module | 7 hours ago | Linux kernel |
| Treason Uncloaked | 13 hours ago | Linux kernel |
| high memory | 2 days ago | Linux kernel |
| semaphore access speed | 2 days ago | Applications and Utilities |
| the kernel how to power off the machine | 2 days ago | Linux kernel |
| Easter Eggs in windows XP | 3 days ago | Windows |
| Root password | 3 days ago | Linux general |
