search for: alloc_copy

Displaying 3 results from an estimated 3 matches for "alloc_copy".

2013 Mar 10
1
[PATCH] fs: fs2fs: Replaced calls to kmalloc and memcpy with kmemdup
...it a/fs/ocfs2/localalloc.c b/fs/ocfs2/localalloc.c index aebeacd..839183f 100644 --- a/fs/ocfs2/localalloc.c +++ b/fs/ocfs2/localalloc.c @@ -434,12 +434,11 @@ void ocfs2_shutdown_local_alloc(struct ocfs2_super *osb) bh = osb->local_alloc_bh; alloc = (struct ocfs2_dinode *) bh->b_data; - alloc_copy = kmalloc(bh->b_size, GFP_NOFS); + alloc_copy = kmemdup(alloc, bh->b_size, GFP_NOFS); if (!alloc_copy) { status = -ENOMEM; goto out_commit; } - memcpy(alloc_copy, alloc, bh->b_size); status = ocfs2_journal_access_di(handle, INODE_CACHE(local_alloc_inode), bh, OCFS2_JOU...
2009 Mar 31
0
[PATCH] ocfs2: remove some pointless conditionals before kfree()
...l_alloc_debug); - if (osb->local_alloc_debug_buf) - kfree(osb->local_alloc_debug_buf); + kfree(osb->local_alloc_debug_buf); osb->local_alloc_debug_buf = NULL; osb->local_alloc_debug = NULL; @@ -423,8 +422,7 @@ out: if (local_alloc_inode) iput(local_alloc_inode); - if (alloc_copy) - kfree(alloc_copy); + kfree(alloc_copy); mlog_exit_void(); } @@ -1284,8 +1282,7 @@ bail: if (main_bm_inode) iput(main_bm_inode); - if (alloc_copy) - kfree(alloc_copy); + kfree(alloc_copy); if (ac) ocfs2_free_alloc_context(ac); diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c...
2009 Feb 13
44
[PATCH 0/40] ocfs2: Detach ocfs2 metadata I/O from struct inode
The following series of patches attempts to detach metadata I/O from struct inode. They are currently tied together pretty tightly. Metadata reads happen via the ocfs2_read_blocks() functions, writes via both jbd2 and ocfs2_write_blocks(). - Each inode has a cache of associated metadata blocks stored on its ip_metadata_cache member. The ocfs2_read/write_blocks() functions take a struct