Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 5802
b: refs/heads/master
c: e74589a
h: refs/heads/master
v: v3
  • Loading branch information
Anton Altaparmakov committed Aug 16, 2005
1 parent 32f45a9 commit 93046f9
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 46 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 65e4308d2500e7daf60c3dccc202c61ffb066c63
refs/heads/master: e74589ac250e463973361774a90fee2c9d71da02
2 changes: 1 addition & 1 deletion trunk/arch/ia64/kernel/domain.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ void build_sched_domains(const cpumask_t *cpu_map)
#endif

/* Attach the domains */
for_each_cpu_mask(i, *cpu_map) {
for_each_online_cpu(i) {
struct sched_domain *sd;
#ifdef CONFIG_SCHED_SMT
sd = &per_cpu(cpu_domains, i);
Expand Down
37 changes: 13 additions & 24 deletions trunk/fs/nfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -814,39 +814,28 @@ nfs_setattr(struct dentry *dentry, struct iattr *attr)
nfs_wb_all(inode);
}
error = NFS_PROTO(inode)->setattr(dentry, &fattr, attr);
if (error == 0)
if (error == 0) {
nfs_refresh_inode(inode, &fattr);
nfs_end_data_update(inode);
unlock_kernel();
return error;
}

/**
* nfs_setattr_update_inode - Update inode metadata after a setattr call.
* @inode: pointer to struct inode
* @attr: pointer to struct iattr
*
* Note: we do this in the *proc.c in order to ensure that
* it works for things like exclusive creates too.
*/
void nfs_setattr_update_inode(struct inode *inode, struct iattr *attr)
{
if ((attr->ia_valid & (ATTR_MODE|ATTR_UID|ATTR_GID)) != 0) {
if ((attr->ia_valid & ATTR_MODE) != 0) {
int mode = attr->ia_mode & S_IALLUGO;
mode |= inode->i_mode & ~S_IALLUGO;
int mode;
mode = inode->i_mode & ~S_IALLUGO;
mode |= attr->ia_mode & S_IALLUGO;
inode->i_mode = mode;
}
if ((attr->ia_valid & ATTR_UID) != 0)
inode->i_uid = attr->ia_uid;
if ((attr->ia_valid & ATTR_GID) != 0)
inode->i_gid = attr->ia_gid;
NFS_FLAGS(inode) |= NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL;
}
if ((attr->ia_valid & ATTR_SIZE) != 0) {
inode->i_size = attr->ia_size;
vmtruncate(inode, attr->ia_size);
if ((attr->ia_valid & ATTR_SIZE) != 0) {
inode->i_size = attr->ia_size;
vmtruncate(inode, attr->ia_size);
}
}
if ((attr->ia_valid & (ATTR_MODE|ATTR_UID|ATTR_GID)) != 0)
NFS_FLAGS(inode) |= NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL;
nfs_end_data_update(inode);
unlock_kernel();
return error;
}

/*
Expand Down
4 changes: 0 additions & 4 deletions trunk/fs/nfs/nfs3proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,6 @@ nfs3_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr,
dprintk("NFS call setattr\n");
fattr->valid = 0;
status = rpc_call(NFS_CLIENT(inode), NFS3PROC_SETATTR, &arg, fattr, 0);
if (status == 0)
nfs_setattr_update_inode(inode, sattr);
dprintk("NFS reply setattr: %d\n", status);
return status;
}
Expand Down Expand Up @@ -372,8 +370,6 @@ nfs3_proc_create(struct inode *dir, struct dentry *dentry, struct iattr *sattr,
* not sure this buys us anything (and I'd have
* to revamp the NFSv3 XDR code) */
status = nfs3_proc_setattr(dentry, &fattr, sattr);
if (status == 0)
nfs_setattr_update_inode(dentry->d_inode, sattr);
nfs_refresh_inode(dentry->d_inode, &fattr);
dprintk("NFS reply setattr (post-create): %d\n", status);
}
Expand Down
10 changes: 2 additions & 8 deletions trunk/fs/nfs/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,6 @@ static int _nfs4_do_setattr(struct nfs_server *server, struct nfs_fattr *fattr,
.rpc_argp = &arg,
.rpc_resp = &res,
};
int status;

fattr->valid = 0;

Expand All @@ -763,8 +762,7 @@ static int _nfs4_do_setattr(struct nfs_server *server, struct nfs_fattr *fattr,
} else
memcpy(&arg.stateid, &zero_stateid, sizeof(arg.stateid));

status = rpc_call_sync(server->client, &msg, 0);
return status;
return rpc_call_sync(server->client, &msg, 0);
}

static int nfs4_do_setattr(struct nfs_server *server, struct nfs_fattr *fattr,
Expand Down Expand Up @@ -1147,8 +1145,6 @@ nfs4_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr,

status = nfs4_do_setattr(NFS_SERVER(inode), fattr,
NFS_FH(inode), sattr, state);
if (status == 0)
nfs_setattr_update_inode(inode, sattr);
if (state != NULL)
nfs4_close_state(state, FMODE_WRITE);
put_rpccred(cred);
Expand Down Expand Up @@ -1453,10 +1449,8 @@ nfs4_proc_create(struct inode *dir, struct dentry *dentry, struct iattr *sattr,
struct nfs_fattr fattr;
status = nfs4_do_setattr(NFS_SERVER(dir), &fattr,
NFS_FH(state->inode), sattr, state);
if (status == 0) {
nfs_setattr_update_inode(state->inode, sattr);
if (status == 0)
goto out;
}
} else if (flags != 0)
goto out;
nfs4_close_state(state, flags);
Expand Down
2 changes: 0 additions & 2 deletions trunk/fs/nfs/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,6 @@ nfs_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr,
dprintk("NFS call setattr\n");
fattr->valid = 0;
status = rpc_call(NFS_CLIENT(inode), NFSPROC_SETATTR, &arg, fattr, 0);
if (status == 0)
nfs_setattr_update_inode(inode, sattr);
dprintk("NFS reply setattr: %d\n", status);
return status;
}
Expand Down
1 change: 0 additions & 1 deletion trunk/fs/nfs_common/nfsacl.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ nfsacl_decode(struct xdr_buf *buf, unsigned int base, unsigned int *aclcnt,
if (xdr_decode_word(buf, base, &entries) ||
entries > NFS_ACL_MAX_ENTRIES)
return -EINVAL;
nfsacl_desc.desc.array_maxlen = entries;
err = xdr_decode_array2(buf, base + 4, &nfsacl_desc.desc);
if (err)
return err;
Expand Down
3 changes: 3 additions & 0 deletions trunk/fs/ntfs/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,9 @@ ToDo/Notes:
fact that the vfs and ntfs inodes are one struct in memory to find
the ntfs inode in memory if present. Also, the ntfs inode has its
own locking so it does not matter if the vfs inode is locked.
- Fix bug in mft record writing where we forgot to set the device in
the buffers when mapping them after the VM had discarded them
Thanks to Martin MOKREJŠ for the bug report.

2.1.22 - Many bug and race fixes and error handling improvements.

Expand Down
2 changes: 2 additions & 0 deletions trunk/fs/ntfs/mft.c
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,7 @@ int ntfs_sync_mft_mirror(ntfs_volume *vol, const unsigned long mft_no,
LCN lcn;
unsigned int vcn_ofs;

bh->b_bdev = vol->sb->s_bdev;
/* Obtain the vcn and offset of the current block. */
vcn = ((VCN)mft_no << vol->mft_record_size_bits) +
(block_start - m_start);
Expand Down Expand Up @@ -725,6 +726,7 @@ int write_mft_record_nolock(ntfs_inode *ni, MFT_RECORD *m, int sync)
LCN lcn;
unsigned int vcn_ofs;

bh->b_bdev = vol->sb->s_bdev;
/* Obtain the vcn and offset of the current block. */
vcn = ((VCN)ni->mft_no << vol->mft_record_size_bits) +
(block_start - m_start);
Expand Down
4 changes: 2 additions & 2 deletions trunk/include/asm-um/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ extern void *to_virt(unsigned long phys);
* casting is the right thing, but 32-bit UML can't have 64-bit virtual
* addresses
*/
#define __pa(virt) to_phys((void *) (unsigned long) (virt))
#define __va(phys) to_virt((unsigned long) (phys))
#define __pa(virt) to_phys((void *) (unsigned long) virt)
#define __va(phys) to_virt((unsigned long) phys)

#define page_to_pfn(page) ((page) - mem_map)
#define pfn_to_page(pfn) (mem_map + (pfn))
Expand Down
1 change: 0 additions & 1 deletion trunk/include/linux/nfs_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,6 @@ extern int nfs_revalidate_inode(struct nfs_server *server, struct inode *inode);
extern int __nfs_revalidate_inode(struct nfs_server *, struct inode *);
extern void nfs_revalidate_mapping(struct inode *inode, struct address_space *mapping);
extern int nfs_setattr(struct dentry *, struct iattr *);
extern void nfs_setattr_update_inode(struct inode *inode, struct iattr *attr);
extern void nfs_begin_attr_update(struct inode *);
extern void nfs_end_attr_update(struct inode *);
extern void nfs_begin_data_update(struct inode *);
Expand Down
1 change: 0 additions & 1 deletion trunk/include/linux/sunrpc/xdr.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ typedef int (*xdr_xcode_elem_t)(struct xdr_array2_desc *desc, void *elem);
struct xdr_array2_desc {
unsigned int elem_size;
unsigned int array_len;
unsigned int array_maxlen;
xdr_xcode_elem_t xcode;
};

Expand Down
1 change: 0 additions & 1 deletion trunk/net/sunrpc/xdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -993,7 +993,6 @@ xdr_xcode_array2(struct xdr_buf *buf, unsigned int base,
return -EINVAL;
} else {
if (xdr_decode_word(buf, base, &desc->array_len) != 0 ||
desc->array_len > desc->array_maxlen ||
(unsigned long) base + 4 + desc->array_len *
desc->elem_size > buf->len)
return -EINVAL;
Expand Down

0 comments on commit 93046f9

Please sign in to comment.