Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph...
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 13 Jan 2012 18:29:21 +0000 (10:29 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 13 Jan 2012 18:29:21 +0000 (10:29 -0800)
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
  ceph: ensure prealloc_blob is in place when removing xattr
  rbd: initialize snap_rwsem in rbd_add()
  ceph: enable/disable dentry complete flags via mount option
  vfs: export symbol d_find_any_alias()
  ceph: always initialize the dentry in open_root_dentry()
  libceph: remove useless return value for osd_client __send_request()
  ceph: avoid iput() while holding spinlock in ceph_dir_fsync
  ceph: avoid useless dget/dput in encode_fh
  ceph: dereference pointer after checking for NULL
  crush: fix force for non-root TAKE
  ceph: remove unnecessary d_fsdata conditional checks
  ceph: Use kmemdup rather than duplicating its implementation

Fix up conflicts in fs/ceph/super.c (d_alloc_root() failure handling vs
always initialize the dentry in open_root_dentry)

1  2 
fs/ceph/dir.c
fs/ceph/inode.c
fs/ceph/super.c
fs/ceph/super.h
fs/dcache.c
include/linux/dcache.h

diff --cc fs/ceph/dir.c
Simple merge
diff --cc fs/ceph/inode.c
Simple merge
diff --cc fs/ceph/super.c
index 48f61a12af66eecdd57f792c2b5da44d5c86468f,9c62fe02ce05f259d7b9e90f7c021f97ddb00048..00de2c9568cd89b13af544b87bc2f43acefa8b30
@@@ -636,21 -650,14 +650,21 @@@ static struct dentry *open_root_dentry(
        req->r_num_caps = 2;
        err = ceph_mdsc_do_request(mdsc, NULL, req);
        if (err == 0) {
 +              struct inode *inode = req->r_target_inode;
 +              req->r_target_inode = NULL;
                dout("open_root_inode success\n");
 -              if (ceph_ino(req->r_target_inode) == CEPH_INO_ROOT &&
 -                  fsc->sb->s_root == NULL)
 -                      root = d_alloc_root(req->r_target_inode);
 -              else
 -                      root = d_obtain_alias(req->r_target_inode);
 +              if (ceph_ino(inode) == CEPH_INO_ROOT &&
 +                  fsc->sb->s_root == NULL) {
 +                      root = d_alloc_root(inode);
 +                      if (!root) {
 +                              iput(inode);
 +                              root = ERR_PTR(-ENOMEM);
 +                              goto out;
 +                      }
-                       ceph_init_dentry(root);
 +              } else {
 +                      root = d_obtain_alias(inode);
 +              }
+               ceph_init_dentry(root);
 -              req->r_target_inode = NULL;
                dout("open_root_inode success, root dentry is %p\n", root);
        } else {
                root = ERR_PTR(err);
diff --cc fs/ceph/super.h
Simple merge
diff --cc fs/dcache.c
Simple merge
Simple merge