When implementing connector fsid cache, we only initialized the cache when the first mark added to object was added by FAN_REPORT_FID group. We forgot to update conn->fsid when the second mark is added by FAN_REPORT_FID group to an already attached connector without fsid cache.
Showing the changes to include/linux (1 of 3 files). Show all
Unified · Split
| @@ -292,7 +292,9 @@ typedef struct fsnotify_mark_connector __rcu *fsnotify_connp_t; · 291 unmodified lines | |||
| 292 | */ | 292 | */ |
| 293 | struct fsnotify_mark_connector { | 293 | struct fsnotify_mark_connector { |
| 294 | spinlock_t lock; | 294 | spinlock_t lock; |
| 295 | unsigned int type; /* Type of object [lock] */ | 295 | unsigned short type; /* Type of object [lock] */ |
| 296 | #define FSNOTIFY_CONN_FLAG_HAS_FSID 0x01 | ||
| 297 | unsigned short flags; /* flags [lock] */ | ||
| 296 | __kernel_fsid_t fsid; /* fsid of filesystem containing object */ | 298 | __kernel_fsid_t fsid; /* fsid of filesystem containing object */ |
| 297 | union { | 299 | union { |
| 298 | /* Object pointer [lock] */ | 300 | /* Object pointer [lock] */ |