git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[CIFS] Allow raw ntlmssp code to be enabled with sec=ntlmssp
[safe/jmp/linux-2.6]
/
fs
/
gfs2
/
ops_export.c
diff --git
a/fs/gfs2/ops_export.c
b/fs/gfs2/ops_export.c
index
b9da623
..
9200ef2
100644
(file)
--- a/
fs/gfs2/ops_export.c
+++ b/
fs/gfs2/ops_export.c
@@
-14,7
+14,6
@@
#include <linux/exportfs.h>
#include <linux/gfs2_ondisk.h>
#include <linux/crc32.h>
#include <linux/exportfs.h>
#include <linux/gfs2_ondisk.h>
#include <linux/crc32.h>
-#include <linux/lm_interface.h>
#include "gfs2.h"
#include "incore.h"
#include "gfs2.h"
#include "incore.h"
@@
-22,8
+21,7
@@
#include "glock.h"
#include "glops.h"
#include "inode.h"
#include "glock.h"
#include "glops.h"
#include "inode.h"
-#include "ops_dentry.h"
-#include "ops_fstype.h"
+#include "super.h"
#include "rgrp.h"
#include "util.h"
#include "rgrp.h"
#include "util.h"
@@
-130,28
+128,17
@@
static int gfs2_get_name(struct dentry *parent, char *name,
static struct dentry *gfs2_get_parent(struct dentry *child)
{
struct qstr dotdot;
static struct dentry *gfs2_get_parent(struct dentry *child)
{
struct qstr dotdot;
- struct inode *inode;
struct dentry *dentry;
struct dentry *dentry;
- gfs2_str2qstr(&dotdot, "..");
- inode = gfs2_lookupi(child->d_inode, &dotdot, 1, NULL);
-
- if (!inode)
- return ERR_PTR(-ENOENT);
/*
/*
- *
In case of an error, @inode carries the error value, and we
- *
have to return that as a(n invalid) pointer to dentry
.
+ *
XXX(hch): it would be a good idea to keep this around as a
+ *
static variable
.
*/
*/
- if (IS_ERR(inode))
- return ERR_PTR(PTR_ERR(inode));
-
- dentry = d_alloc_anon(inode);
- if (!dentry) {
- iput(inode);
- return ERR_PTR(-ENOMEM);
- }
+ gfs2_str2qstr(&dotdot, "..");
- dentry->d_op = &gfs2_dops;
+ dentry = d_obtain_alias(gfs2_lookupi(child->d_inode, &dotdot, 1));
+ if (!IS_ERR(dentry))
+ dentry->d_op = &gfs2_dops;
return dentry;
}
return dentry;
}
@@
-204,8
+191,6
@@
static struct dentry *gfs2_get_dentry(struct super_block *sb,
inode = gfs2_inode_lookup(sb, DT_UNKNOWN,
inum->no_addr,
0, 0);
inode = gfs2_inode_lookup(sb, DT_UNKNOWN,
inum->no_addr,
0, 0);
- if (!inode)
- goto fail;
if (IS_ERR(inode)) {
error = PTR_ERR(inode);
goto fail;
if (IS_ERR(inode)) {
error = PTR_ERR(inode);
goto fail;
@@
-227,7
+212,7
@@
static struct dentry *gfs2_get_dentry(struct super_block *sb,
}
error = -EIO;
}
error = -EIO;
- if (GFS2_I(inode)->i_di
.di_
flags & GFS2_DIF_SYSTEM) {
+ if (GFS2_I(inode)->i_di
sk
flags & GFS2_DIF_SYSTEM) {
iput(inode);
goto fail;
}
iput(inode);
goto fail;
}
@@
-235,13
+220,9
@@
static struct dentry *gfs2_get_dentry(struct super_block *sb,
gfs2_glock_dq_uninit(&i_gh);
out_inode:
gfs2_glock_dq_uninit(&i_gh);
out_inode:
- dentry = d_alloc_anon(inode);
- if (!dentry) {
- iput(inode);
- return ERR_PTR(-ENOMEM);
- }
-
- dentry->d_op = &gfs2_dops;
+ dentry = d_obtain_alias(inode);
+ if (!IS_ERR(dentry))
+ dentry->d_op = &gfs2_dops;
return dentry;
fail_rgd:
return dentry;
fail_rgd: