#include <linux/posix_acl.h>
#include <linux/sort.h>
#include <linux/gfs2_ondisk.h>
+#include <linux/crc32.h>
#include <asm/semaphore.h>
#include "gfs2.h"
struct inode *gfs2_lookup_simple(struct inode *dip, const char *name)
{
struct qstr qstr;
- qstr.name = name;
- qstr.len = strlen(name);
- qstr.hash = gfs2_disk_hash(qstr.name, qstr.len);
+ gfs2_str2qstr(&qstr, name);
return gfs2_lookupi(dip, &qstr, 1, NULL);
}
if (error)
return error;
- dotname.len = 1;
- dotname.name = ".";
- dotname.hash = gfs2_disk_hash(dotname.name, dotname.len);
+ gfs2_str2qstr(&dotname, ".");
error = gfs2_dir_del(ip, &dotname);
if (error)
return error;
struct qstr dotdot;
int error = 0;
- memset(&dotdot, 0, sizeof(struct qstr));
- dotdot.name = "..";
- dotdot.len = 2;
- dotdot.hash = gfs2_disk_hash(dotdot.name, dotdot.len);
+ gfs2_str2qstr(&dotdot, "..");
igrab(dir);