summaryrefslogtreecommitdiff
path: root/fs/ceph/dir.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2011-01-03 22:55:21 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-01-03 22:55:21 +0000
commit04228460a3ded723b2da09141c76c45ddd712caf (patch)
treedb7b9143b150ead1e9fec10760a1d5ff4045a5e7 /fs/ceph/dir.c
parent7c0ab43e6ab09d72dc8dbac2521b2f819ccc4026 (diff)
parent24c78557741395e038e83f25367cf2bfd7f582b8 (diff)
Merge branch 'fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6
Diffstat (limited to 'fs/ceph/dir.c')
-rw-r--r--fs/ceph/dir.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c
index 158c700fdca..d902948a90d 100644
--- a/fs/ceph/dir.c
+++ b/fs/ceph/dir.c
@@ -40,7 +40,8 @@ int ceph_init_dentry(struct dentry *dentry)
if (dentry->d_fsdata)
return 0;
- if (ceph_snap(dentry->d_parent->d_inode) == CEPH_NOSNAP)
+ if (dentry->d_parent == NULL || /* nfs fh_to_dentry */
+ ceph_snap(dentry->d_parent->d_inode) == CEPH_NOSNAP)
dentry->d_op = &ceph_dentry_ops;
else if (ceph_snap(dentry->d_parent->d_inode) == CEPH_SNAPDIR)
dentry->d_op = &ceph_snapdir_dentry_ops;