diff options
| author | Al Viro <viro@zeniv.linux.org.uk> | 2016-12-16 16:34:52 -0500 |
|---|---|---|
| committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-12-16 16:34:52 -0500 |
| commit | 9763f7a4a5f7b1a7c480fa06d01b2bad25163c0a (patch) | |
| tree | 63e3f777b699ec26761eab948c40d70bba1476b0 /fs/namei.c | |
| parent | 3c55d6bcfe8163ff2b5636b4aabe3caa3f5d95f4 (diff) | |
| parent | 1c4344a50d702307185cb98fb67bff938cd66aa0 (diff) | |
Merge branch 'work.autofs' into for-linus
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namei.c')
| -rw-r--r-- | fs/namei.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/fs/namei.c b/fs/namei.c index 1c8f4386b03f..47781b0d909d 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
| @@ -1200,7 +1200,7 @@ static int follow_managed(struct path *path, struct nameidata *nd) | |||
| 1200 | if (managed & DCACHE_MANAGE_TRANSIT) { | 1200 | if (managed & DCACHE_MANAGE_TRANSIT) { |
| 1201 | BUG_ON(!path->dentry->d_op); | 1201 | BUG_ON(!path->dentry->d_op); |
| 1202 | BUG_ON(!path->dentry->d_op->d_manage); | 1202 | BUG_ON(!path->dentry->d_op->d_manage); |
| 1203 | ret = path->dentry->d_op->d_manage(path->dentry, false); | 1203 | ret = path->dentry->d_op->d_manage(path, false); |
| 1204 | if (ret < 0) | 1204 | if (ret < 0) |
| 1205 | break; | 1205 | break; |
| 1206 | } | 1206 | } |
| @@ -1263,10 +1263,10 @@ int follow_down_one(struct path *path) | |||
| 1263 | } | 1263 | } |
| 1264 | EXPORT_SYMBOL(follow_down_one); | 1264 | EXPORT_SYMBOL(follow_down_one); |
| 1265 | 1265 | ||
| 1266 | static inline int managed_dentry_rcu(struct dentry *dentry) | 1266 | static inline int managed_dentry_rcu(const struct path *path) |
| 1267 | { | 1267 | { |
| 1268 | return (dentry->d_flags & DCACHE_MANAGE_TRANSIT) ? | 1268 | return (path->dentry->d_flags & DCACHE_MANAGE_TRANSIT) ? |
| 1269 | dentry->d_op->d_manage(dentry, true) : 0; | 1269 | path->dentry->d_op->d_manage(path, true) : 0; |
| 1270 | } | 1270 | } |
| 1271 | 1271 | ||
| 1272 | /* | 1272 | /* |
| @@ -1282,7 +1282,7 @@ static bool __follow_mount_rcu(struct nameidata *nd, struct path *path, | |||
| 1282 | * Don't forget we might have a non-mountpoint managed dentry | 1282 | * Don't forget we might have a non-mountpoint managed dentry |
| 1283 | * that wants to block transit. | 1283 | * that wants to block transit. |
| 1284 | */ | 1284 | */ |
| 1285 | switch (managed_dentry_rcu(path->dentry)) { | 1285 | switch (managed_dentry_rcu(path)) { |
| 1286 | case -ECHILD: | 1286 | case -ECHILD: |
| 1287 | default: | 1287 | default: |
| 1288 | return false; | 1288 | return false; |
| @@ -1392,8 +1392,7 @@ int follow_down(struct path *path) | |||
| 1392 | if (managed & DCACHE_MANAGE_TRANSIT) { | 1392 | if (managed & DCACHE_MANAGE_TRANSIT) { |
| 1393 | BUG_ON(!path->dentry->d_op); | 1393 | BUG_ON(!path->dentry->d_op); |
| 1394 | BUG_ON(!path->dentry->d_op->d_manage); | 1394 | BUG_ON(!path->dentry->d_op->d_manage); |
| 1395 | ret = path->dentry->d_op->d_manage( | 1395 | ret = path->dentry->d_op->d_manage(path, false); |
| 1396 | path->dentry, false); | ||
| 1397 | if (ret < 0) | 1396 | if (ret < 0) |
| 1398 | return ret == -EISDIR ? 0 : ret; | 1397 | return ret == -EISDIR ? 0 : ret; |
| 1399 | } | 1398 | } |
