aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/inode.c')
-rw-r--r--fs/gfs2/inode.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index d403d51d5b0f..6140c2434e85 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -15,6 +15,7 @@
15#include <linux/posix_acl.h> 15#include <linux/posix_acl.h>
16#include <linux/sort.h> 16#include <linux/sort.h>
17#include <linux/gfs2_ondisk.h> 17#include <linux/gfs2_ondisk.h>
18#include <linux/crc32.h>
18#include <asm/semaphore.h> 19#include <asm/semaphore.h>
19 20
20#include "gfs2.h" 21#include "gfs2.h"
@@ -701,9 +702,7 @@ int gfs2_change_nlink(struct gfs2_inode *ip, int diff)
701struct inode *gfs2_lookup_simple(struct inode *dip, const char *name) 702struct inode *gfs2_lookup_simple(struct inode *dip, const char *name)
702{ 703{
703 struct qstr qstr; 704 struct qstr qstr;
704 qstr.name = name; 705 gfs2_str2qstr(&qstr, name);
705 qstr.len = strlen(name);
706 qstr.hash = gfs2_disk_hash(qstr.name, qstr.len);
707 return gfs2_lookupi(dip, &qstr, 1, NULL); 706 return gfs2_lookupi(dip, &qstr, 1, NULL);
708} 707}
709 708
@@ -1389,9 +1388,7 @@ int gfs2_rmdiri(struct gfs2_inode *dip, struct qstr *name,
1389 if (error) 1388 if (error)
1390 return error; 1389 return error;
1391 1390
1392 dotname.len = 1; 1391 gfs2_str2qstr(&dotname, ".");
1393 dotname.name = ".";
1394 dotname.hash = gfs2_disk_hash(dotname.name, dotname.len);
1395 error = gfs2_dir_del(ip, &dotname); 1392 error = gfs2_dir_del(ip, &dotname);
1396 if (error) 1393 if (error)
1397 return error; 1394 return error;
@@ -1487,10 +1484,7 @@ int gfs2_ok_to_move(struct gfs2_inode *this, struct gfs2_inode *to)
1487 struct qstr dotdot; 1484 struct qstr dotdot;
1488 int error = 0; 1485 int error = 0;
1489 1486
1490 memset(&dotdot, 0, sizeof(struct qstr)); 1487 gfs2_str2qstr(&dotdot, "..");
1491 dotdot.name = "..";
1492 dotdot.len = 2;
1493 dotdot.hash = gfs2_disk_hash(dotdot.name, dotdot.len);
1494 1488
1495 igrab(dir); 1489 igrab(dir);
1496 1490