Skip to content

Commit

Permalink
fsnotify: rename FS_IN_ISDIR to FS_ISDIR
Browse files Browse the repository at this point in the history
The _IN_ in the naming is reserved for flags only used by inotify.  Since I
am about to use this flag for fanotify rename it to be generic like the
rest.

Signed-off-by: Eric Paris <eparis@redhat.com>
  • Loading branch information
Eric Paris committed Oct 28, 2010
1 parent e1c048b commit b29866a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion fs/notify/inotify/inotify_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ static int __init inotify_user_setup(void)
BUILD_BUG_ON(IN_Q_OVERFLOW != FS_Q_OVERFLOW);
BUILD_BUG_ON(IN_IGNORED != FS_IN_IGNORED);
BUILD_BUG_ON(IN_EXCL_UNLINK != FS_EXCL_UNLINK);
BUILD_BUG_ON(IN_ISDIR != FS_IN_ISDIR);
BUILD_BUG_ON(IN_ISDIR != FS_ISDIR);
BUILD_BUG_ON(IN_ONESHOT != FS_IN_ONESHOT);

BUG_ON(hweight32(ALL_INOTIFY_BITS) != 21);
Expand Down
20 changes: 10 additions & 10 deletions include/linux/fsnotify.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir,
old_dir_mask |= FS_DN_RENAME;

if (isdir) {
old_dir_mask |= FS_IN_ISDIR;
new_dir_mask |= FS_IN_ISDIR;
old_dir_mask |= FS_ISDIR;
new_dir_mask |= FS_ISDIR;
}

fsnotify(old_dir, old_dir_mask, old_dir, FSNOTIFY_EVENT_INODE, old_name, fs_cookie);
Expand Down Expand Up @@ -137,7 +137,7 @@ static inline void fsnotify_nameremove(struct dentry *dentry, int isdir)
__u32 mask = FS_DELETE;

if (isdir)
mask |= FS_IN_ISDIR;
mask |= FS_ISDIR;

fsnotify_parent(NULL, dentry, mask);
}
Expand Down Expand Up @@ -179,7 +179,7 @@ static inline void fsnotify_link(struct inode *dir, struct inode *inode, struct
*/
static inline void fsnotify_mkdir(struct inode *inode, struct dentry *dentry)
{
__u32 mask = (FS_CREATE | FS_IN_ISDIR);
__u32 mask = (FS_CREATE | FS_ISDIR);
struct inode *d_inode = dentry->d_inode;

audit_inode_child(dentry, inode);
Expand All @@ -197,7 +197,7 @@ static inline void fsnotify_access(struct file *file)
__u32 mask = FS_ACCESS;

if (S_ISDIR(inode->i_mode))
mask |= FS_IN_ISDIR;
mask |= FS_ISDIR;

if (!(file->f_mode & FMODE_NONOTIFY)) {
fsnotify_parent(path, NULL, mask);
Expand All @@ -215,7 +215,7 @@ static inline void fsnotify_modify(struct file *file)
__u32 mask = FS_MODIFY;

if (S_ISDIR(inode->i_mode))
mask |= FS_IN_ISDIR;
mask |= FS_ISDIR;

if (!(file->f_mode & FMODE_NONOTIFY)) {
fsnotify_parent(path, NULL, mask);
Expand All @@ -233,7 +233,7 @@ static inline void fsnotify_open(struct file *file)
__u32 mask = FS_OPEN;

if (S_ISDIR(inode->i_mode))
mask |= FS_IN_ISDIR;
mask |= FS_ISDIR;

if (!(file->f_mode & FMODE_NONOTIFY)) {
fsnotify_parent(path, NULL, mask);
Expand All @@ -252,7 +252,7 @@ static inline void fsnotify_close(struct file *file)
__u32 mask = (mode & FMODE_WRITE) ? FS_CLOSE_WRITE : FS_CLOSE_NOWRITE;

if (S_ISDIR(inode->i_mode))
mask |= FS_IN_ISDIR;
mask |= FS_ISDIR;

if (!(file->f_mode & FMODE_NONOTIFY)) {
fsnotify_parent(path, NULL, mask);
Expand All @@ -269,7 +269,7 @@ static inline void fsnotify_xattr(struct dentry *dentry)
__u32 mask = FS_ATTRIB;

if (S_ISDIR(inode->i_mode))
mask |= FS_IN_ISDIR;
mask |= FS_ISDIR;

fsnotify_parent(NULL, dentry, mask);
fsnotify(inode, mask, inode, FSNOTIFY_EVENT_INODE, NULL, 0);
Expand Down Expand Up @@ -304,7 +304,7 @@ static inline void fsnotify_change(struct dentry *dentry, unsigned int ia_valid)

if (mask) {
if (S_ISDIR(inode->i_mode))
mask |= FS_IN_ISDIR;
mask |= FS_ISDIR;

fsnotify_parent(NULL, dentry, mask);
fsnotify(inode, mask, inode, FSNOTIFY_EVENT_INODE, NULL, 0);
Expand Down
4 changes: 2 additions & 2 deletions include/linux/fsnotify_backend.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
#define FS_ACCESS_PERM 0x00020000 /* access event in a permissions hook */

#define FS_EXCL_UNLINK 0x04000000 /* do not send events if object is unlinked */
#define FS_IN_ISDIR 0x40000000 /* event occurred against dir */
#define FS_ISDIR 0x40000000 /* event occurred against dir */
#define FS_IN_ONESHOT 0x80000000 /* only send event once */

#define FS_DN_RENAME 0x10000000 /* file renamed */
Expand All @@ -72,7 +72,7 @@
FS_DELETE | FS_DELETE_SELF | FS_MOVE_SELF | \
FS_UNMOUNT | FS_Q_OVERFLOW | FS_IN_IGNORED | \
FS_OPEN_PERM | FS_ACCESS_PERM | FS_EXCL_UNLINK | \
FS_IN_ISDIR | FS_IN_ONESHOT | FS_DN_RENAME | \
FS_ISDIR | FS_IN_ONESHOT | FS_DN_RENAME | \
FS_DN_MULTISHOT | FS_EVENT_ON_CHILD)

struct fsnotify_group;
Expand Down

0 comments on commit b29866a

Please sign in to comment.