From: shaver Date: Fri, 27 Jun 2003 17:25:31 +0000 (+0000) Subject: Fix lock-match fallout from 1228: use the inode against which the intent lock X-Git-Tag: v1_7_100~1^91~94 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=6d82ac272e0ef33942702278ab94a207655ee214;p=fs%2Flustre-release.git Fix lock-match fallout from 1228: use the inode against which the intent lock was granted, often not the one against which the lock was requested, when matching l_data. Also, match locks in ll_dir_readpage. Remove some deadwood fops-functions. --- diff --git a/lustre/tests/getdents.c b/lustre/tests/getdents.c new file mode 100644 index 0000000..b4155a9 --- /dev/null +++ b/lustre/tests/getdents.c @@ -0,0 +1,31 @@ +#include +#include +#include +#include + +int main(int argc, char **argv) +{ + DIR *dir; + struct dirent64 *entry; + + if (argc < 2) { + fprintf(stderr, "Usage: %s dirname\n", argv[0]); + return 1; + } + + dir = opendir(argv[1]); + if (!dir) { + int rc = errno; + perror("opendir"); + return rc; + } + + while ((entry = readdir64(dir))) { + puts(entry->d_name); + } + + closedir(dir); + + return 0; +} +