Skip to content

Commit

Permalink
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/k…
Browse files Browse the repository at this point in the history
…ernel/git/mfasheh/ocfs2

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2:
  ocfs2: Use GFP_NOFS in kmalloc during localalloc window move
  ocfs2: Allow uid/gid/perm changes of symlinks
  ocfs2/dlm: dlmdebug.c: make 2 functions static
  ocfs2: make struct o2cb_stack_ops static
  ocfs2: make struct ocfs2_control_device static
  ocfs2: Correct merge of 52f7c21 (Move /sys/o2cb to /sys/fs/o2cb)
  • Loading branch information
Linus Torvalds committed May 2, 2008
2 parents d626e3b + 4ba1c5b commit be2e880
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion fs/ocfs2/cluster/sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ int o2cb_sys_init(void)
{
int ret;

o2cb_kset = kset_create_and_add("o2cb", NULL, NULL);
o2cb_kset = kset_create_and_add("o2cb", NULL, fs_kobj);
if (!o2cb_kset)
return -ENOMEM;

Expand Down
8 changes: 5 additions & 3 deletions fs/ocfs2/dlm/dlmdebug.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
#define MLOG_MASK_PREFIX ML_DLM
#include "cluster/masklog.h"

int stringify_lockname(const char *lockname, int locklen, char *buf, int len);
static int stringify_lockname(const char *lockname, int locklen, char *buf,
int len);

void dlm_print_one_lock_resource(struct dlm_lock_resource *res)
{
Expand Down Expand Up @@ -251,7 +252,8 @@ EXPORT_SYMBOL_GPL(dlm_errname);
*
* For more on lockname formats, please refer to dlmglue.c and ocfs2_lockid.h.
*/
int stringify_lockname(const char *lockname, int locklen, char *buf, int len)
static int stringify_lockname(const char *lockname, int locklen, char *buf,
int len)
{
int out = 0;
__be64 inode_blkno_be;
Expand Down Expand Up @@ -368,7 +370,7 @@ static void dlm_debug_free(struct kref *kref)
kfree(dc);
}

void dlm_debug_put(struct dlm_debug_ctxt *dc)
static void dlm_debug_put(struct dlm_debug_ctxt *dc)
{
if (dc)
kref_put(&dc->debug_refcnt, dlm_debug_free);
Expand Down
4 changes: 4 additions & 0 deletions fs/ocfs2/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -1048,6 +1048,10 @@ int ocfs2_setattr(struct dentry *dentry, struct iattr *attr)
mlog_entry("(0x%p, '%.*s')\n", dentry,
dentry->d_name.len, dentry->d_name.name);

/* ensuring we don't even attempt to truncate a symlink */
if (S_ISLNK(inode->i_mode))
attr->ia_valid &= ~ATTR_SIZE;

if (attr->ia_valid & ATTR_MODE)
mlog(0, "mode change: %d\n", attr->ia_mode);
if (attr->ia_valid & ATTR_UID)
Expand Down
4 changes: 2 additions & 2 deletions fs/ocfs2/localalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ void ocfs2_shutdown_local_alloc(struct ocfs2_super *osb)
bh = osb->local_alloc_bh;
alloc = (struct ocfs2_dinode *) bh->b_data;

alloc_copy = kmalloc(bh->b_size, GFP_KERNEL);
alloc_copy = kmalloc(bh->b_size, GFP_NOFS);
if (!alloc_copy) {
status = -ENOMEM;
goto out_commit;
Expand Down Expand Up @@ -931,7 +931,7 @@ static int ocfs2_local_alloc_slide_window(struct ocfs2_super *osb,
* local alloc shutdown won't try to double free main bitmap
* bits. Make a copy so the sync function knows which bits to
* free. */
alloc_copy = kmalloc(osb->local_alloc_bh->b_size, GFP_KERNEL);
alloc_copy = kmalloc(osb->local_alloc_bh->b_size, GFP_NOFS);
if (!alloc_copy) {
status = -ENOMEM;
mlog_errno(status);
Expand Down
2 changes: 1 addition & 1 deletion fs/ocfs2/stack_o2cb.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ static int o2cb_cluster_this_node(unsigned int *node)
return 0;
}

struct ocfs2_stack_operations o2cb_stack_ops = {
static struct ocfs2_stack_operations o2cb_stack_ops = {
.connect = o2cb_cluster_connect,
.disconnect = o2cb_cluster_disconnect,
.hangup = o2cb_cluster_hangup,
Expand Down
2 changes: 1 addition & 1 deletion fs/ocfs2/stack_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ static const struct file_operations ocfs2_control_fops = {
.owner = THIS_MODULE,
};

struct miscdevice ocfs2_control_device = {
static struct miscdevice ocfs2_control_device = {
.minor = MISC_DYNAMIC_MINOR,
.name = "ocfs2_control",
.fops = &ocfs2_control_fops,
Expand Down
2 changes: 2 additions & 0 deletions fs/ocfs2/symlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,11 @@ const struct inode_operations ocfs2_symlink_inode_operations = {
.readlink = page_readlink,
.follow_link = ocfs2_follow_link,
.getattr = ocfs2_getattr,
.setattr = ocfs2_setattr,
};
const struct inode_operations ocfs2_fast_symlink_inode_operations = {
.readlink = ocfs2_readlink,
.follow_link = ocfs2_follow_link,
.getattr = ocfs2_getattr,
.setattr = ocfs2_setattr,
};

0 comments on commit be2e880

Please sign in to comment.