X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fllite%2Fllite_foreign_symlink.c;h=d401fa0d3e07c86dd557301acb06dcd6f46b6285;hb=refs%2Fchanges%2F41%2F44541%2F16;hp=c36f3636c07298af4097be4b99da31614d31fff8;hpb=1cf7a8d46ca7a5b446e4f579c82f5f643f4c8650;p=fs%2Flustre-release.git diff --git a/lustre/llite/llite_foreign_symlink.c b/lustre/llite/llite_foreign_symlink.c index c36f363..d401fa0 100644 --- a/lustre/llite/llite_foreign_symlink.c +++ b/lustre/llite/llite_foreign_symlink.c @@ -203,7 +203,7 @@ static int ll_foreign_symlink_parse(struct ll_sb_info *sbi, * of foreign LOV is relative path of faked symlink destination, * to be completed by prefix */ - if (!(sbi->ll_flags & LL_SBI_FOREIGN_SYMLINK_UPCALL)) + if (!test_bit(LL_SBI_FOREIGN_SYMLINK_UPCALL, sbi->ll_flags)) rc = ll_foreign_symlink_default_parse(sbi, inode, lfm, destname); else /* upcall is available */ @@ -448,7 +448,7 @@ ssize_t foreign_symlink_enable_show(struct kobject *kobj, ll_kset.kobj); return snprintf(buf, PAGE_SIZE, "%d\n", - !!(sbi->ll_flags & LL_SBI_FOREIGN_SYMLINK)); + test_bit(LL_SBI_FOREIGN_SYMLINK, sbi->ll_flags)); } /* @@ -475,9 +475,9 @@ ssize_t foreign_symlink_enable_store(struct kobject *kobj, return rc; if (val) - sbi->ll_flags |= LL_SBI_FOREIGN_SYMLINK; + set_bit(LL_SBI_FOREIGN_SYMLINK, sbi->ll_flags); else - sbi->ll_flags &= ~LL_SBI_FOREIGN_SYMLINK; + clear_bit(LL_SBI_FOREIGN_SYMLINK, sbi->ll_flags); return count; } @@ -609,7 +609,7 @@ ssize_t foreign_symlink_upcall_store(struct kobject *kobj, * order, we may end up using the format provided by a different * upcall than the one set in ll_foreign_symlink_upcall */ - sbi->ll_flags &= ~LL_SBI_FOREIGN_SYMLINK_UPCALL; + clear_bit(LL_SBI_FOREIGN_SYMLINK_UPCALL, sbi->ll_flags); up_write(&sbi->ll_foreign_symlink_sem); if (strcmp(new, "none")) { @@ -752,7 +752,7 @@ ssize_t foreign_symlink_upcall_info_store(struct kobject *kobj, old_nb_items = sbi->ll_foreign_symlink_upcall_nb_items; sbi->ll_foreign_symlink_upcall_items = new_items; sbi->ll_foreign_symlink_upcall_nb_items = nb_items; - sbi->ll_flags |= LL_SBI_FOREIGN_SYMLINK_UPCALL; + set_bit(LL_SBI_FOREIGN_SYMLINK_UPCALL, sbi->ll_flags); up_write(&sbi->ll_foreign_symlink_sem); /* free old_items */