aboutsummaryrefslogtreecommitdiffstats
path: root/fs/inotify_user.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/inotify_user.c')
-rw-r--r--fs/inotify_user.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/inotify_user.c b/fs/inotify_user.c
index 3ab09a65c456..7b94a1e3c015 100644
--- a/fs/inotify_user.c
+++ b/fs/inotify_user.c
@@ -41,9 +41,9 @@ static struct kmem_cache *event_cachep __read_mostly;
41static struct vfsmount *inotify_mnt __read_mostly; 41static struct vfsmount *inotify_mnt __read_mostly;
42 42
43/* these are configurable via /proc/sys/fs/inotify/ */ 43/* these are configurable via /proc/sys/fs/inotify/ */
44int inotify_max_user_instances __read_mostly; 44static int inotify_max_user_instances __read_mostly;
45int inotify_max_user_watches __read_mostly; 45static int inotify_max_user_watches __read_mostly;
46int inotify_max_queued_events __read_mostly; 46static int inotify_max_queued_events __read_mostly;
47 47
48/* 48/*
49 * Lock ordering: 49 * Lock ordering:
@@ -367,7 +367,7 @@ static int find_inode(const char __user *dirname, struct nameidata *nd,
367 /* you can only watch an inode if you have read permissions on it */ 367 /* you can only watch an inode if you have read permissions on it */
368 error = vfs_permission(nd, MAY_READ); 368 error = vfs_permission(nd, MAY_READ);
369 if (error) 369 if (error)
370 path_release(nd); 370 path_put(&nd->path);
371 return error; 371 return error;
372} 372}
373 373
@@ -667,7 +667,7 @@ asmlinkage long sys_inotify_add_watch(int fd, const char __user *path, u32 mask)
667 goto fput_and_out; 667 goto fput_and_out;
668 668
669 /* inode held in place by reference to nd; dev by fget on fd */ 669 /* inode held in place by reference to nd; dev by fget on fd */
670 inode = nd.dentry->d_inode; 670 inode = nd.path.dentry->d_inode;
671 dev = filp->private_data; 671 dev = filp->private_data;
672 672
673 mutex_lock(&dev->up_mutex); 673 mutex_lock(&dev->up_mutex);
@@ -676,7 +676,7 @@ asmlinkage long sys_inotify_add_watch(int fd, const char __user *path, u32 mask)
676 ret = create_watch(dev, inode, mask); 676 ret = create_watch(dev, inode, mask);
677 mutex_unlock(&dev->up_mutex); 677 mutex_unlock(&dev->up_mutex);
678 678
679 path_release(&nd); 679 path_put(&nd.path);
680fput_and_out: 680fput_and_out:
681 fput_light(filp, fput_needed); 681 fput_light(filp, fput_needed);
682 return ret; 682 return ret;