diff options
| author | Dan Williams <dan.j.williams@intel.com> | 2017-11-15 16:56:11 -0800 |
|---|---|---|
| committer | Dan Williams <dan.j.williams@intel.com> | 2017-11-15 16:56:11 -0800 |
| commit | 4247f24c23589bcc3bc3490515ef8c9497e9ae55 (patch) | |
| tree | 89726a0e171c443a3e8def2992b56dbd8a21df21 /fs/ceph | |
| parent | 79ab67ede21f536851a99ea68ee6fc1f5435e055 (diff) | |
| parent | 9f586fff6574f6ecbf323f92d44ffaf0d96225fe (diff) | |
| download | talos-op-linux-4247f24c23589bcc3bc3490515ef8c9497e9ae55.tar.gz talos-op-linux-4247f24c23589bcc3bc3490515ef8c9497e9ae55.zip | |
Merge branch 'for-4.15/dax' into libnvdimm-for-next
Diffstat (limited to 'fs/ceph')
| -rw-r--r-- | fs/ceph/mds_client.c | 11 | ||||
| -rw-r--r-- | fs/ceph/snap.c | 8 |
2 files changed, 9 insertions, 10 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index 84edfc60d87a..f23c820daaed 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c @@ -734,12 +734,13 @@ static int __choose_mds(struct ceph_mds_client *mdsc, inode = req->r_inode; ihold(inode); } else { - /* req->r_dentry is non-null for LSSNAP request. - * fall-thru */ - WARN_ON_ONCE(!req->r_dentry); + /* req->r_dentry is non-null for LSSNAP request */ + rcu_read_lock(); + inode = get_nonsnap_parent(req->r_dentry); + rcu_read_unlock(); + dout("__choose_mds using snapdir's parent %p\n", inode); } - } - if (!inode && req->r_dentry) { + } else if (req->r_dentry) { /* ignore race with rename; old or new d_parent is okay */ struct dentry *parent; struct inode *dir; diff --git a/fs/ceph/snap.c b/fs/ceph/snap.c index 1ffc8b426c1c..7fc0b850c352 100644 --- a/fs/ceph/snap.c +++ b/fs/ceph/snap.c @@ -374,12 +374,10 @@ static int build_snap_context(struct ceph_snap_realm *realm, realm->ino, realm, snapc, snapc->seq, (unsigned int) snapc->num_snaps); - if (realm->cached_context) { - ceph_put_snap_context(realm->cached_context); - /* queue realm for cap_snap creation */ - list_add_tail(&realm->dirty_item, dirty_realms); - } + ceph_put_snap_context(realm->cached_context); realm->cached_context = snapc; + /* queue realm for cap_snap creation */ + list_add_tail(&realm->dirty_item, dirty_realms); return 0; fail: |

