X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Finclude%2Flprocfs_status.h;h=c119ce5393d7f78e18516efca5b1170db7c392c2;hb=refs%2Fchanges%2F50%2F26650%2F5;hp=83ede1b3bc8566e5f99fd9ac0b66da360daa3b11;hpb=6712478e79588e73e28c7ccac3afc7ac2368a4f3;p=fs%2Flustre-release.git diff --git a/lustre/include/lprocfs_status.h b/lustre/include/lprocfs_status.h index 83ede1b..c119ce5 100644 --- a/lustre/include/lprocfs_status.h +++ b/lustre/include/lprocfs_status.h @@ -669,7 +669,8 @@ static int name##_single_open(struct inode *inode, struct file *file) \ return rc; \ \ return single_open(file, name##_seq_show, \ - inode->i_private ? : PDE_DATA(inode)); \ + inode->i_private ? inode->i_private : \ + PDE_DATA(inode)); \ } \ static const struct file_operations name##_fops = { \ .owner = THIS_MODULE, \ @@ -701,11 +702,11 @@ static const struct file_operations name##_fops = { \ { \ struct seq_file *seq = file->private_data; \ return lprocfs_##type##_seq_write(file, buffer, \ - count, seq->private); \ + count, seq->private); \ } \ LPROC_SEQ_FOPS(name##_##type); -#define LPROC_SEQ_FOPS_WO_TYPE(name, type) \ +#define LPROC_SEQ_FOPS_WR_ONLY(name, type) \ static ssize_t name##_##type##_write(struct file *file, \ const char __user *buffer, size_t count, \ loff_t *off) \ @@ -715,7 +716,8 @@ static const struct file_operations name##_fops = { \ static int name##_##type##_open(struct inode *inode, struct file *file)\ { \ return single_open(file, NULL, \ - inode->i_private ? : PDE_DATA(inode));\ + inode->i_private ? inode->i_private : \ + PDE_DATA(inode)); \ } \ static const struct file_operations name##_##type##_fops = { \ .open = name##_##type##_open, \ @@ -975,7 +977,7 @@ u64 lprocfs_stats_collector(struct lprocfs_stats *stats, int idx, #define LPROC_SEQ_FOPS(name) #define LPROC_SEQ_FOPS_RO_TYPE(name, type) #define LPROC_SEQ_FOPS_RW_TYPE(name, type) -#define LPROC_SEQ_FOPS_WO_TYPE(name, type) +#define LPROC_SEQ_FOPS_WR_ONLY(name, type) /* lprocfs_jobstats.c */ static inline