Whamcloud - gitweb
b:2316 Save the owner of f_op before replace it with llite special file operation
authorwangdi <wangdi>
Thu, 11 Dec 2003 08:30:50 +0000 (08:30 +0000)
committerwangdi <wangdi>
Thu, 11 Dec 2003 08:30:50 +0000 (08:30 +0000)
lustre/llite/special.c

index aeb281b..35d6082 100644 (file)
@@ -63,14 +63,16 @@ static inline void save_fops(struct file *filp, struct inode *inode,
         
         if (sfops != filp->f_op) {
                 struct file_operations** pfop = get_save_fops (filp, FILE_OPS);
-                
+                struct module   *save_module = NULL;
+
+                save_module = filp->f_op->owner;
                 *pfop = filp->f_op;
                 if (S_ISCHR(inode->i_mode)) {
                         filp->f_op = &ll_special_chr_file_fops;
                 }else if (S_ISFIFO(inode->i_mode)){
                         filp->f_op = &ll_special_fifo_file_fops;
                 }
-                filp->f_op->owner = lli->ll_save_ffop->owner; 
+                filp->f_op->owner = save_module;
         }
 }