diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ocfs2/cluster/sys.c | 2 | ||||
-rw-r--r-- | fs/ocfs2/dlm/dlmdebug.c | 8 | ||||
-rw-r--r-- | fs/ocfs2/file.c | 4 | ||||
-rw-r--r-- | fs/ocfs2/localalloc.c | 4 | ||||
-rw-r--r-- | fs/ocfs2/stack_o2cb.c | 2 | ||||
-rw-r--r-- | fs/ocfs2/stack_user.c | 2 | ||||
-rw-r--r-- | fs/ocfs2/symlink.c | 2 |
7 files changed, 16 insertions, 8 deletions
diff --git a/fs/ocfs2/cluster/sys.c b/fs/ocfs2/cluster/sys.c index 98429fd68499..bc702dab5d1f 100644 --- a/fs/ocfs2/cluster/sys.c +++ b/fs/ocfs2/cluster/sys.c | |||
@@ -65,7 +65,7 @@ int o2cb_sys_init(void) | |||
65 | { | 65 | { |
66 | int ret; | 66 | int ret; |
67 | 67 | ||
68 | o2cb_kset = kset_create_and_add("o2cb", NULL, NULL); | 68 | o2cb_kset = kset_create_and_add("o2cb", NULL, fs_kobj); |
69 | if (!o2cb_kset) | 69 | if (!o2cb_kset) |
70 | return -ENOMEM; | 70 | return -ENOMEM; |
71 | 71 | ||
diff --git a/fs/ocfs2/dlm/dlmdebug.c b/fs/ocfs2/dlm/dlmdebug.c index 5f6d858770a2..1b81dcba175d 100644 --- a/fs/ocfs2/dlm/dlmdebug.c +++ b/fs/ocfs2/dlm/dlmdebug.c | |||
@@ -44,7 +44,8 @@ | |||
44 | #define MLOG_MASK_PREFIX ML_DLM | 44 | #define MLOG_MASK_PREFIX ML_DLM |
45 | #include "cluster/masklog.h" | 45 | #include "cluster/masklog.h" |
46 | 46 | ||
47 | int stringify_lockname(const char *lockname, int locklen, char *buf, int len); | 47 | static int stringify_lockname(const char *lockname, int locklen, char *buf, |
48 | int len); | ||
48 | 49 | ||
49 | void dlm_print_one_lock_resource(struct dlm_lock_resource *res) | 50 | void dlm_print_one_lock_resource(struct dlm_lock_resource *res) |
50 | { | 51 | { |
@@ -251,7 +252,8 @@ EXPORT_SYMBOL_GPL(dlm_errname); | |||
251 | * | 252 | * |
252 | * For more on lockname formats, please refer to dlmglue.c and ocfs2_lockid.h. | 253 | * For more on lockname formats, please refer to dlmglue.c and ocfs2_lockid.h. |
253 | */ | 254 | */ |
254 | int stringify_lockname(const char *lockname, int locklen, char *buf, int len) | 255 | static int stringify_lockname(const char *lockname, int locklen, char *buf, |
256 | int len) | ||
255 | { | 257 | { |
256 | int out = 0; | 258 | int out = 0; |
257 | __be64 inode_blkno_be; | 259 | __be64 inode_blkno_be; |
@@ -368,7 +370,7 @@ static void dlm_debug_free(struct kref *kref) | |||
368 | kfree(dc); | 370 | kfree(dc); |
369 | } | 371 | } |
370 | 372 | ||
371 | void dlm_debug_put(struct dlm_debug_ctxt *dc) | 373 | static void dlm_debug_put(struct dlm_debug_ctxt *dc) |
372 | { | 374 | { |
373 | if (dc) | 375 | if (dc) |
374 | kref_put(&dc->debug_refcnt, dlm_debug_free); | 376 | kref_put(&dc->debug_refcnt, dlm_debug_free); |
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 9154c82d3258..57e0d30cde98 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c | |||
@@ -1048,6 +1048,10 @@ int ocfs2_setattr(struct dentry *dentry, struct iattr *attr) | |||
1048 | mlog_entry("(0x%p, '%.*s')\n", dentry, | 1048 | mlog_entry("(0x%p, '%.*s')\n", dentry, |
1049 | dentry->d_name.len, dentry->d_name.name); | 1049 | dentry->d_name.len, dentry->d_name.name); |
1050 | 1050 | ||
1051 | /* ensuring we don't even attempt to truncate a symlink */ | ||
1052 | if (S_ISLNK(inode->i_mode)) | ||
1053 | attr->ia_valid &= ~ATTR_SIZE; | ||
1054 | |||
1051 | if (attr->ia_valid & ATTR_MODE) | 1055 | if (attr->ia_valid & ATTR_MODE) |
1052 | mlog(0, "mode change: %d\n", attr->ia_mode); | 1056 | mlog(0, "mode change: %d\n", attr->ia_mode); |
1053 | if (attr->ia_valid & ATTR_UID) | 1057 | if (attr->ia_valid & ATTR_UID) |
diff --git a/fs/ocfs2/localalloc.c b/fs/ocfs2/localalloc.c index ce0dc147602a..be774bdc8b36 100644 --- a/fs/ocfs2/localalloc.c +++ b/fs/ocfs2/localalloc.c | |||
@@ -260,7 +260,7 @@ void ocfs2_shutdown_local_alloc(struct ocfs2_super *osb) | |||
260 | bh = osb->local_alloc_bh; | 260 | bh = osb->local_alloc_bh; |
261 | alloc = (struct ocfs2_dinode *) bh->b_data; | 261 | alloc = (struct ocfs2_dinode *) bh->b_data; |
262 | 262 | ||
263 | alloc_copy = kmalloc(bh->b_size, GFP_KERNEL); | 263 | alloc_copy = kmalloc(bh->b_size, GFP_NOFS); |
264 | if (!alloc_copy) { | 264 | if (!alloc_copy) { |
265 | status = -ENOMEM; | 265 | status = -ENOMEM; |
266 | goto out_commit; | 266 | goto out_commit; |
@@ -931,7 +931,7 @@ static int ocfs2_local_alloc_slide_window(struct ocfs2_super *osb, | |||
931 | * local alloc shutdown won't try to double free main bitmap | 931 | * local alloc shutdown won't try to double free main bitmap |
932 | * bits. Make a copy so the sync function knows which bits to | 932 | * bits. Make a copy so the sync function knows which bits to |
933 | * free. */ | 933 | * free. */ |
934 | alloc_copy = kmalloc(osb->local_alloc_bh->b_size, GFP_KERNEL); | 934 | alloc_copy = kmalloc(osb->local_alloc_bh->b_size, GFP_NOFS); |
935 | if (!alloc_copy) { | 935 | if (!alloc_copy) { |
936 | status = -ENOMEM; | 936 | status = -ENOMEM; |
937 | mlog_errno(status); | 937 | mlog_errno(status); |
diff --git a/fs/ocfs2/stack_o2cb.c b/fs/ocfs2/stack_o2cb.c index ac1d74c63bf5..bbd1667aa7d3 100644 --- a/fs/ocfs2/stack_o2cb.c +++ b/fs/ocfs2/stack_o2cb.c | |||
@@ -385,7 +385,7 @@ static int o2cb_cluster_this_node(unsigned int *node) | |||
385 | return 0; | 385 | return 0; |
386 | } | 386 | } |
387 | 387 | ||
388 | struct ocfs2_stack_operations o2cb_stack_ops = { | 388 | static struct ocfs2_stack_operations o2cb_stack_ops = { |
389 | .connect = o2cb_cluster_connect, | 389 | .connect = o2cb_cluster_connect, |
390 | .disconnect = o2cb_cluster_disconnect, | 390 | .disconnect = o2cb_cluster_disconnect, |
391 | .hangup = o2cb_cluster_hangup, | 391 | .hangup = o2cb_cluster_hangup, |
diff --git a/fs/ocfs2/stack_user.c b/fs/ocfs2/stack_user.c index 7428663f9cbb..b503772cd0ec 100644 --- a/fs/ocfs2/stack_user.c +++ b/fs/ocfs2/stack_user.c | |||
@@ -635,7 +635,7 @@ static const struct file_operations ocfs2_control_fops = { | |||
635 | .owner = THIS_MODULE, | 635 | .owner = THIS_MODULE, |
636 | }; | 636 | }; |
637 | 637 | ||
638 | struct miscdevice ocfs2_control_device = { | 638 | static struct miscdevice ocfs2_control_device = { |
639 | .minor = MISC_DYNAMIC_MINOR, | 639 | .minor = MISC_DYNAMIC_MINOR, |
640 | .name = "ocfs2_control", | 640 | .name = "ocfs2_control", |
641 | .fops = &ocfs2_control_fops, | 641 | .fops = &ocfs2_control_fops, |
diff --git a/fs/ocfs2/symlink.c b/fs/ocfs2/symlink.c index 7134007ba22f..ba9dbb51d25b 100644 --- a/fs/ocfs2/symlink.c +++ b/fs/ocfs2/symlink.c | |||
@@ -167,9 +167,11 @@ const struct inode_operations ocfs2_symlink_inode_operations = { | |||
167 | .readlink = page_readlink, | 167 | .readlink = page_readlink, |
168 | .follow_link = ocfs2_follow_link, | 168 | .follow_link = ocfs2_follow_link, |
169 | .getattr = ocfs2_getattr, | 169 | .getattr = ocfs2_getattr, |
170 | .setattr = ocfs2_setattr, | ||
170 | }; | 171 | }; |
171 | const struct inode_operations ocfs2_fast_symlink_inode_operations = { | 172 | const struct inode_operations ocfs2_fast_symlink_inode_operations = { |
172 | .readlink = ocfs2_readlink, | 173 | .readlink = ocfs2_readlink, |
173 | .follow_link = ocfs2_follow_link, | 174 | .follow_link = ocfs2_follow_link, |
174 | .getattr = ocfs2_getattr, | 175 | .getattr = ocfs2_getattr, |
176 | .setattr = ocfs2_setattr, | ||
175 | }; | 177 | }; |