Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'ceph-for-4.9-rc9' of git://github.com/ceph/ceph-client

Pull ceph fix from Ilya Dryomov:
"A fix for an issue with ->d_revalidate() in ceph, causing frequent
kernel crashes.

Marked for stable - it goes back to 4.6, but started popping up only
in 4.8"

* tag 'ceph-for-4.9-rc9' of git://github.com/ceph/ceph-client:
ceph: don't set req->r_locked_dir in ceph_d_revalidate

+14 -10
+14 -10
fs/ceph/dir.c
··· 1261 1261 return -ECHILD; 1262 1262 1263 1263 op = ceph_snap(dir) == CEPH_SNAPDIR ? 1264 - CEPH_MDS_OP_LOOKUPSNAP : CEPH_MDS_OP_LOOKUP; 1264 + CEPH_MDS_OP_LOOKUPSNAP : CEPH_MDS_OP_GETATTR; 1265 1265 req = ceph_mdsc_create_request(mdsc, op, USE_ANY_MDS); 1266 1266 if (!IS_ERR(req)) { 1267 1267 req->r_dentry = dget(dentry); 1268 - req->r_num_caps = 2; 1268 + req->r_num_caps = op == CEPH_MDS_OP_GETATTR ? 1 : 2; 1269 1269 1270 1270 mask = CEPH_STAT_CAP_INODE | CEPH_CAP_AUTH_SHARED; 1271 1271 if (ceph_security_xattr_wanted(dir)) 1272 1272 mask |= CEPH_CAP_XATTR_SHARED; 1273 1273 req->r_args.getattr.mask = mask; 1274 1274 1275 - req->r_locked_dir = dir; 1276 1275 err = ceph_mdsc_do_request(mdsc, NULL, req); 1277 - if (err == 0 || err == -ENOENT) { 1278 - if (dentry == req->r_dentry) { 1279 - valid = !d_unhashed(dentry); 1280 - } else { 1281 - d_invalidate(req->r_dentry); 1282 - err = -EAGAIN; 1283 - } 1276 + switch (err) { 1277 + case 0: 1278 + if (d_really_is_positive(dentry) && 1279 + d_inode(dentry) == req->r_target_inode) 1280 + valid = 1; 1281 + break; 1282 + case -ENOENT: 1283 + if (d_really_is_negative(dentry)) 1284 + valid = 1; 1285 + /* Fallthrough */ 1286 + default: 1287 + break; 1284 1288 } 1285 1289 ceph_mdsc_put_request(req); 1286 1290 dout("d_revalidate %p lookup result=%d\n",