X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=fs%2Finotify_user.c;h=400f8064a548cc7777ca605db6477fc4b2379891;hb=66f221875dc10813aa2f06c83ad60d0eb1356406;hp=d85c7d931cdfd4cb4cfa5bc839b08b4de22f9bb1;hpb=16dbc6c9616363fe53811abcbd935336dc0a0f01;p=safe%2Fjmp%2Flinux-2.6 diff --git a/fs/inotify_user.c b/fs/inotify_user.c index d85c7d9..400f806 100644 --- a/fs/inotify_user.c +++ b/fs/inotify_user.c @@ -76,10 +76,10 @@ struct inotify_device { struct mutex ev_mutex; /* protects event queue */ struct mutex up_mutex; /* synchronizes watch updates */ struct list_head events; /* list of queued events */ - atomic_t count; /* reference count */ struct user_struct *user; /* user who opened this dev */ struct inotify_handle *ih; /* inotify handle */ struct fasync_struct *fa; /* async notification */ + atomic_t count; /* reference count */ unsigned int queue_size; /* size of the queue (bytes) */ unsigned int event_count; /* number of pending events */ unsigned int max_events; /* maximum number of events */ @@ -537,9 +537,6 @@ static int inotify_release(struct inode *ignored, struct file *file) inotify_dev_event_dequeue(dev); mutex_unlock(&dev->ev_mutex); - if (file->f_flags & FASYNC) - inotify_fasync(-1, file, 0); - /* free this device: the put matching the get in inotify_init() */ put_inotify_dev(dev); @@ -604,7 +601,7 @@ asmlinkage long sys_inotify_init1(int flags) goto out_put_fd; } - user = get_uid(current->user); + user = get_current_user(); if (unlikely(atomic_read(&user->inotify_devs) >= inotify_max_user_instances)) { ret = -EMFILE;