Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 83857
b: refs/heads/master
c: ce634ab
h: refs/heads/master
i:
  83855: 5028dea
v: v3
  • Loading branch information
David Howells authored and Linus Torvalds committed Feb 7, 2008
1 parent 486a3a7 commit d147158
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 8 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: e33ab086ae227a34e34b17e86dbb9d2dbaebb489
refs/heads/master: ce634ab28e7dbcc13ebe6e7bc5bc7de4f8def4c8
8 changes: 4 additions & 4 deletions trunk/fs/cifs/cifsfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,11 @@ cifs_read_super(struct super_block *sb, void *data,
#endif
sb->s_blocksize = CIFS_MAX_MSGSIZE;
sb->s_blocksize_bits = 14; /* default 2**14 = CIFS_MAX_MSGSIZE */
inode = iget(sb, ROOT_I);
inode = cifs_iget(sb, ROOT_I);

if (!inode) {
rc = -ENOMEM;
if (IS_ERR(inode)) {
rc = PTR_ERR(inode);
inode = NULL;
goto out_no_root;
}

Expand Down Expand Up @@ -520,7 +521,6 @@ static int cifs_remount(struct super_block *sb, int *flags, char *data)
}

static const struct super_operations cifs_super_ops = {
.read_inode = cifs_read_inode,
.put_super = cifs_put_super,
.statfs = cifs_statfs,
.alloc_inode = cifs_alloc_inode,
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/cifs/cifsfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ extern void cifs_read_inode(struct inode *);

/* Functions related to inodes */
extern const struct inode_operations cifs_dir_inode_ops;
extern struct inode *cifs_iget(struct super_block *, unsigned long);
extern int cifs_create(struct inode *, struct dentry *, int,
struct nameidata *);
extern struct dentry *cifs_lookup(struct inode *, struct dentry *,
Expand Down
22 changes: 19 additions & 3 deletions trunk/fs/cifs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -586,10 +586,18 @@ static const struct inode_operations cifs_ipc_inode_ops = {
};

/* gets root inode */
void cifs_read_inode(struct inode *inode)
struct inode *cifs_iget(struct super_block *sb, unsigned long ino)
{
int xid, rc;
int xid;
struct cifs_sb_info *cifs_sb;
struct inode *inode;
long rc;

inode = iget_locked(sb, ino);
if (!inode)
return ERR_PTR(-ENOMEM);
if (!(inode->i_state & I_NEW))
return inode;

cifs_sb = CIFS_SB(inode->i_sb);
xid = GetXid();
Expand All @@ -606,10 +614,18 @@ void cifs_read_inode(struct inode *inode)
inode->i_fop = &simple_dir_operations;
inode->i_uid = cifs_sb->mnt_uid;
inode->i_gid = cifs_sb->mnt_gid;
_FreeXid(xid);
iget_failed(inode);
return ERR_PTR(rc);
}

/* can not call macro FreeXid here since in a void func */
unlock_new_inode(inode);

/* can not call macro FreeXid here since in a void func
* TODO: This is no longer true
*/
_FreeXid(xid);
return inode;
}

int cifs_unlink(struct inode *inode, struct dentry *direntry)
Expand Down

0 comments on commit d147158

Please sign in to comment.