summaryrefslogtreecommitdiffstats
path: root/fs/ceph/dir.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2010-09-22 18:45:01 +0200
committerIngo Molnar <mingo@elte.hu>2010-09-22 18:45:01 +0200
commit90edf27fb89241917e91155bfdcc7c8e5a587222 (patch)
treea2d1841cfe382f426a3b6ccb306b0665ad455885 /fs/ceph/dir.c
parent41945f6ccf1e86f87fddf6b32db9cf431c05fb54 (diff)
parent8b15575cae7a93a784c3005c42b069edd9ba64dd (diff)
downloadlinux-90edf27fb89241917e91155bfdcc7c8e5a587222.tar.gz
linux-90edf27fb89241917e91155bfdcc7c8e5a587222.tar.bz2
linux-90edf27fb89241917e91155bfdcc7c8e5a587222.zip
Merge branch 'linus' into perf/core
Conflicts: kernel/hw_breakpoint.c Merge reason: resolve the conflict. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'fs/ceph/dir.c')
-rw-r--r--fs/ceph/dir.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c
index 6e4f43ff23ec..a1986eb52045 100644
--- a/fs/ceph/dir.c
+++ b/fs/ceph/dir.c
@@ -1021,11 +1021,15 @@ out_touch:
static void ceph_dentry_release(struct dentry *dentry)
{
struct ceph_dentry_info *di = ceph_dentry(dentry);
- struct inode *parent_inode = dentry->d_parent->d_inode;
- u64 snapid = ceph_snap(parent_inode);
+ struct inode *parent_inode = NULL;
+ u64 snapid = CEPH_NOSNAP;
+ if (!IS_ROOT(dentry)) {
+ parent_inode = dentry->d_parent->d_inode;
+ if (parent_inode)
+ snapid = ceph_snap(parent_inode);
+ }
dout("dentry_release %p parent %p\n", dentry, parent_inode);
-
if (parent_inode && snapid != CEPH_SNAPDIR) {
struct ceph_inode_info *ci = ceph_inode(parent_inode);