diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-13 13:29:21 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-13 13:29:21 -0500 |
commit | 1a52bb0b686844021597d190e562ab55d1210104 (patch) | |
tree | 7edf13509869a6a7f1f488a679f15ff6c3057c54 /fs/ceph/super.c | |
parent | 8638094e956a47dbb9a25166705a91e9a0981d52 (diff) | |
parent | 83eb26af0db71f2dfe551405c55d982288fa6178 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client
* '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)
Diffstat (limited to 'fs/ceph/super.c')
-rw-r--r-- | fs/ceph/super.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/fs/ceph/super.c b/fs/ceph/super.c index 48f61a12af66..00de2c9568cd 100644 --- a/fs/ceph/super.c +++ b/fs/ceph/super.c | |||
@@ -131,6 +131,8 @@ enum { | |||
131 | Opt_rbytes, | 131 | Opt_rbytes, |
132 | Opt_norbytes, | 132 | Opt_norbytes, |
133 | Opt_noasyncreaddir, | 133 | Opt_noasyncreaddir, |
134 | Opt_dcache, | ||
135 | Opt_nodcache, | ||
134 | Opt_ino32, | 136 | Opt_ino32, |
135 | }; | 137 | }; |
136 | 138 | ||
@@ -152,6 +154,8 @@ static match_table_t fsopt_tokens = { | |||
152 | {Opt_rbytes, "rbytes"}, | 154 | {Opt_rbytes, "rbytes"}, |
153 | {Opt_norbytes, "norbytes"}, | 155 | {Opt_norbytes, "norbytes"}, |
154 | {Opt_noasyncreaddir, "noasyncreaddir"}, | 156 | {Opt_noasyncreaddir, "noasyncreaddir"}, |
157 | {Opt_dcache, "dcache"}, | ||
158 | {Opt_nodcache, "nodcache"}, | ||
155 | {Opt_ino32, "ino32"}, | 159 | {Opt_ino32, "ino32"}, |
156 | {-1, NULL} | 160 | {-1, NULL} |
157 | }; | 161 | }; |
@@ -231,6 +235,12 @@ static int parse_fsopt_token(char *c, void *private) | |||
231 | case Opt_noasyncreaddir: | 235 | case Opt_noasyncreaddir: |
232 | fsopt->flags |= CEPH_MOUNT_OPT_NOASYNCREADDIR; | 236 | fsopt->flags |= CEPH_MOUNT_OPT_NOASYNCREADDIR; |
233 | break; | 237 | break; |
238 | case Opt_dcache: | ||
239 | fsopt->flags |= CEPH_MOUNT_OPT_DCACHE; | ||
240 | break; | ||
241 | case Opt_nodcache: | ||
242 | fsopt->flags &= ~CEPH_MOUNT_OPT_DCACHE; | ||
243 | break; | ||
234 | case Opt_ino32: | 244 | case Opt_ino32: |
235 | fsopt->flags |= CEPH_MOUNT_OPT_INO32; | 245 | fsopt->flags |= CEPH_MOUNT_OPT_INO32; |
236 | break; | 246 | break; |
@@ -377,6 +387,10 @@ static int ceph_show_options(struct seq_file *m, struct dentry *root) | |||
377 | seq_puts(m, ",norbytes"); | 387 | seq_puts(m, ",norbytes"); |
378 | if (fsopt->flags & CEPH_MOUNT_OPT_NOASYNCREADDIR) | 388 | if (fsopt->flags & CEPH_MOUNT_OPT_NOASYNCREADDIR) |
379 | seq_puts(m, ",noasyncreaddir"); | 389 | seq_puts(m, ",noasyncreaddir"); |
390 | if (fsopt->flags & CEPH_MOUNT_OPT_DCACHE) | ||
391 | seq_puts(m, ",dcache"); | ||
392 | else | ||
393 | seq_puts(m, ",nodcache"); | ||
380 | 394 | ||
381 | if (fsopt->wsize) | 395 | if (fsopt->wsize) |
382 | seq_printf(m, ",wsize=%d", fsopt->wsize); | 396 | seq_printf(m, ",wsize=%d", fsopt->wsize); |
@@ -647,10 +661,10 @@ static struct dentry *open_root_dentry(struct ceph_fs_client *fsc, | |||
647 | root = ERR_PTR(-ENOMEM); | 661 | root = ERR_PTR(-ENOMEM); |
648 | goto out; | 662 | goto out; |
649 | } | 663 | } |
650 | ceph_init_dentry(root); | ||
651 | } else { | 664 | } else { |
652 | root = d_obtain_alias(inode); | 665 | root = d_obtain_alias(inode); |
653 | } | 666 | } |
667 | ceph_init_dentry(root); | ||
654 | dout("open_root_inode success, root dentry is %p\n", root); | 668 | dout("open_root_inode success, root dentry is %p\n", root); |
655 | } else { | 669 | } else { |
656 | root = ERR_PTR(err); | 670 | root = ERR_PTR(err); |