You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
[GFS2] Further updates to dir and logging code
This reduces the size of the directory code by about 3k and gets readdir() to use the functions which were introduced in the previous directory code update. Two memory allocations are merged into one. Eliminates zeroing of some buffers which were never used before they were initialised by other data. There is still scope for further improvement in the directory code. On the logging side, a hand created mutex has been replaced by a standard Linux mutex in the log allocation code. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include <linux/completion.h>
|
||||
#include <linux/buffer_head.h>
|
||||
#include <linux/gfs2_ondisk.h>
|
||||
#include <linux/crc32.h>
|
||||
#include <asm/semaphore.h>
|
||||
|
||||
#include "gfs2.h"
|
||||
@@ -153,7 +154,7 @@ static int gfs2_get_name(struct dentry *parent, char *name,
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
error = gfs2_dir_read(dip, &offset, &gnfd, get_name_filldir);
|
||||
error = gfs2_dir_read(dir, &offset, &gnfd, get_name_filldir);
|
||||
|
||||
gfs2_glock_dq_uninit(&gh);
|
||||
|
||||
@@ -165,12 +166,11 @@ static int gfs2_get_name(struct dentry *parent, char *name,
|
||||
|
||||
static struct dentry *gfs2_get_parent(struct dentry *child)
|
||||
{
|
||||
struct qstr dotdot = { .name = "..", .len = 2 };
|
||||
struct qstr dotdot;
|
||||
struct inode *inode;
|
||||
struct dentry *dentry;
|
||||
|
||||
dotdot.hash = gfs2_disk_hash(dotdot.name, dotdot.len);
|
||||
|
||||
gfs2_str2qstr(&dotdot, "..");
|
||||
inode = gfs2_lookupi(child->d_inode, &dotdot, 1, NULL);
|
||||
|
||||
if (!inode)
|
||||
|
||||
Reference in New Issue
Block a user