Commit edd7fe7
committed
client: Gracefully handle empty pathname for statxat()
man statx(2)[1] says the following:
. . .
AT_EMPTY_PATH
If pathname is an empty string, operate on the file referred to by
dirfd (which may have been obtained using the open(2) O_PATH flag).
In this case, dirfd can refer to any type of file, not just a
directory.
If dirfd is AT_FDCWD, the call operates on the current working
directory.
. . .
Look out for an empty pathname and use the relative fd's inode in the
presence of AT_EMPTY_PATH flag before calling internal _getattr().
Fixes: https://tracker.ceph.com/issues/68189
Review with: git show -w
[1] https://www.man7.org/linux/man-pages/man2/statx.2.html
Signed-off-by: Anoop C S <[email protected]>1 parent 92c5ab9 commit edd7fe7
File tree
5 files changed
+47
-6
lines changed- src
- client
- include/cephfs
- test/libcephfs
5 files changed
+47
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12243 | 12243 | | |
12244 | 12244 | | |
12245 | 12245 | | |
| 12246 | + | |
12246 | 12247 | | |
12247 | 12248 | | |
12248 | 12249 | | |
12249 | 12250 | | |
12250 | 12251 | | |
12251 | 12252 | | |
12252 | 12253 | | |
12253 | | - | |
12254 | | - | |
12255 | | - | |
12256 | | - | |
12257 | | - | |
| 12254 | + | |
| 12255 | + | |
| 12256 | + | |
| 12257 | + | |
| 12258 | + | |
| 12259 | + | |
| 12260 | + | |
| 12261 | + | |
| 12262 | + | |
| 12263 | + | |
| 12264 | + | |
| 12265 | + | |
| 12266 | + | |
| 12267 | + | |
12258 | 12268 | | |
| 12269 | + | |
| 12270 | + | |
| 12271 | + | |
12259 | 12272 | | |
12260 | 12273 | | |
12261 | 12274 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
113 | 116 | | |
114 | 117 | | |
115 | 118 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
937 | 937 | | |
938 | 938 | | |
939 | 939 | | |
940 | | - | |
| 940 | + | |
941 | 941 | | |
942 | 942 | | |
943 | 943 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
982 | 982 | | |
983 | 983 | | |
984 | 984 | | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
985 | 988 | | |
| 989 | + | |
986 | 990 | | |
987 | 991 | | |
988 | 992 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2706 | 2706 | | |
2707 | 2707 | | |
2708 | 2708 | | |
| 2709 | + | |
| 2710 | + | |
| 2711 | + | |
| 2712 | + | |
| 2713 | + | |
| 2714 | + | |
| 2715 | + | |
| 2716 | + | |
| 2717 | + | |
| 2718 | + | |
| 2719 | + | |
| 2720 | + | |
| 2721 | + | |
2709 | 2722 | | |
2710 | 2723 | | |
2711 | 2724 | | |
2712 | 2725 | | |
2713 | 2726 | | |
2714 | 2727 | | |
2715 | 2728 | | |
| 2729 | + | |
| 2730 | + | |
| 2731 | + | |
| 2732 | + | |
| 2733 | + | |
| 2734 | + | |
| 2735 | + | |
| 2736 | + | |
2716 | 2737 | | |
2717 | 2738 | | |
2718 | 2739 | | |
| |||
0 commit comments