Changeset 264 for ksyslog/trunk


Ignore:
Timestamp:
10/16/13 02:04:40 (11 years ago)
Author:
atzm
Message:

fsnotify_open compat

Location:
ksyslog/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ksyslog/trunk/compat.h

    r248 r264  
    1414                pos = rcu_dereference_raw(list_next_rcu(pos))) 
    1515#endif 
     16 
     17static inline void 
     18compat_fsnotify_open(struct file *file) 
     19{ 
     20#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35) 
     21        fsnotify_open(file->f_path.dentry); 
     22#else 
     23        fsnotify_open(file); 
     24#endif 
     25} 
    1626 
    1727#if LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0) 
  • ksyslog/trunk/ksyslog.c

    r263 r264  
    1919#include "ksyslog.h" 
    2020 
    21 static DEFINE_SPINLOCK(ksyslog_vfs_lock); 
    22  
    2321static struct ksyslog_queue ksyslog_queue; 
    2422static struct socket *ksyslog_rcv_sk = NULL; 
     
    10098                goto out; 
    10199 
    102         fsnotify_open(file->f_path.dentry); 
     100        compat_fsnotify_open(file); 
    103101 
    104102        if (unlikely(S_ISDIR(file->f_path.dentry->d_inode->i_mode))) { 
     
    321319                goto out; 
    322320 
    323         spin_lock(&ksyslog_vfs_lock); 
    324  
    325321        file = ksyslog_open(ksyslog_path); 
    326322        if (unlikely(IS_ERR(file))) { 
    327                 spin_unlock(&ksyslog_vfs_lock); 
    328  
    329323                spin_lock_bh(&ksyslog_queue.lock); 
    330324                ksyslog_entry_migrate(&write_queue, &ksyslog_queue); 
    331325                spin_unlock_bh(&ksyslog_queue.lock); 
    332  
    333326                goto out; 
    334327        } 
     
    365358 
    366359        ksyslog_close(file); 
    367         spin_unlock(&ksyslog_vfs_lock); 
    368360 
    369361out: 
Note: See TracChangeset for help on using the changeset viewer.