-----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCAAdFiEEq1nRK9aeMoq1VSgcnJ2qBz9kQNkFAmrt7VQACgkQnJ2qBz9k
 QNlCTgf/aCAAU+KgZF9QqWHe3OlftDc4bfImAVum+Z4iRTsxksgTAqFom+x2SgqH
 dulu87lSF/qqD7bZWCOqcnphJ0s+/647bZ7Lp7uRLcEL0km3fvE5H4fhI7loK56E
 gW0+WlTyZUwKKN4lvY2BT4CXaRIeouTyQC8k1OC2kYilkadBJ7da5Pe9+AUxpFrU
 wLiDDVWJLZFK6GfT5kkjkRJevecgUqj/7aff1K3Q8VbgmiRIMShtwjP03Wh1e6dP
 SnVyrqU6OnnSE6HSrLQcTBx37PWhjuzRGYwAskL9c/XEyazKPOJCmmYZZvkYLEsd
 KfXWAiKEjZm8zbtip+TOzK/XlzZqcQ==
 =LFSf
 -----END PGP SIGNATURE-----

Merge tag 'fsnotify_for_v7.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs

Pull fsnotify fixes from Jan Kara:
 "Two small fixes for fsnotify"

* tag 'fsnotify_for_v7.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
  inotify: do not coalesce rename events
  fsnotify: preserve 64-bit pre-content ranges
This commit is contained in:
Linus Torvalds 2026-11-06 08:55:48 -08:00
commit fb382e8efd
5 changed files with 8 additions and 8 deletions

View File

@ -444,7 +444,7 @@ struct fanotify_perm_event {
struct fanotify_event fae;
struct path path;
loff_t pos; /* FANOTIFY_NO_RANGE if unavailable */
size_t count;
u64 count;
u32 response; /* userspace answer to the event */
unsigned short state; /* state of the event */
unsigned short watchdog_cnt; /* already scanned by watchdog? */

View File

@ -157,7 +157,7 @@ static inline __u32 fsnotify_object_watched(struct inode *inode, __u32 mnt_mask,
/* Report pre-content event with optional range info */
int fsnotify_pre_content(const struct path *path, const loff_t *ppos,
size_t count)
u64 count)
{
struct file_range range;

View File

@ -36,7 +36,7 @@ static bool event_compare(struct fsnotify_event *old_fsn,
old = INOTIFY_E(old_fsn);
new = INOTIFY_E(new_fsn);
if (old->mask & FS_IN_IGNORED)
if (old->mask & (FS_IN_IGNORED | FS_MOVE))
return false;
if ((old->mask == new->mask) &&
(old->wd == new->wd) &&

View File

@ -135,7 +135,7 @@ int fsnotify_open_perm_and_set_mode(struct file *file);
* fsnotify_file_area_perm - permission hook before access to file range
*/
static inline int fsnotify_file_area_perm(struct file *file, int perm_mask,
const loff_t *ppos, size_t count)
const loff_t *ppos, u64 count)
{
/*
* filesystem may be modified in the context of permission events
@ -213,7 +213,7 @@ static inline int fsnotify_open_perm_and_set_mode(struct file *file)
}
static inline int fsnotify_file_area_perm(struct file *file, int perm_mask,
const loff_t *ppos, size_t count)
const loff_t *ppos, u64 count)
{
return 0;
}

View File

@ -323,7 +323,7 @@ struct fs_error_report {
struct file_range {
const struct path *path;
loff_t pos;
size_t count;
u64 count;
};
static inline const struct path *file_range_path(const struct file_range *range)
@ -946,12 +946,12 @@ static inline void fsnotify_init_event(struct fsnotify_event *event)
INIT_LIST_HEAD(&event->list);
}
int fsnotify_pre_content(const struct path *path, const loff_t *ppos,
size_t count);
u64 count);
#else
static inline int fsnotify_pre_content(const struct path *path,
const loff_t *ppos, size_t count)
const loff_t *ppos, u64 count)
{
return 0;
}