diff options
Diffstat (limited to 'fs/nfsd/nfsctl.c')
-rw-r--r-- | fs/nfsd/nfsctl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c index a0871b3efeb7..3ef017b3b5bd 100644 --- a/fs/nfsd/nfsctl.c +++ b/fs/nfsd/nfsctl.c | |||
@@ -105,7 +105,7 @@ static ssize_t nfsctl_transaction_write(struct file *file, const char __user *bu | |||
105 | char *data; | 105 | char *data; |
106 | ssize_t rv; | 106 | ssize_t rv; |
107 | 107 | ||
108 | if (ino >= sizeof(write_op)/sizeof(write_op[0]) || !write_op[ino]) | 108 | if (ino >= ARRAY_SIZE(write_op) || !write_op[ino]) |
109 | return -EINVAL; | 109 | return -EINVAL; |
110 | 110 | ||
111 | data = simple_transaction_get(file, buf, size); | 111 | data = simple_transaction_get(file, buf, size); |
@@ -134,7 +134,7 @@ static ssize_t nfsctl_transaction_read(struct file *file, char __user *buf, size | |||
134 | return simple_transaction_read(file, buf, size, pos); | 134 | return simple_transaction_read(file, buf, size, pos); |
135 | } | 135 | } |
136 | 136 | ||
137 | static struct file_operations transaction_ops = { | 137 | static const struct file_operations transaction_ops = { |
138 | .write = nfsctl_transaction_write, | 138 | .write = nfsctl_transaction_write, |
139 | .read = nfsctl_transaction_read, | 139 | .read = nfsctl_transaction_read, |
140 | .release = simple_transaction_release, | 140 | .release = simple_transaction_release, |
@@ -146,7 +146,7 @@ static int exports_open(struct inode *inode, struct file *file) | |||
146 | return seq_open(file, &nfs_exports_op); | 146 | return seq_open(file, &nfs_exports_op); |
147 | } | 147 | } |
148 | 148 | ||
149 | static struct file_operations exports_operations = { | 149 | static const struct file_operations exports_operations = { |
150 | .open = exports_open, | 150 | .open = exports_open, |
151 | .read = seq_read, | 151 | .read = seq_read, |
152 | .llseek = seq_lseek, | 152 | .llseek = seq_lseek, |