mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
->atomic_open() prototype change - pass int * instead of bool *
... and let finish_open() report having opened the file via that sucker. Next step: don't modify od->filp at all. [AV: FILE_CREATE was already used by cifs; Miklos' fix folded] Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
a8277b9baa
commit
47237687d7
14 changed files with 63 additions and 52 deletions
|
|
@ -859,7 +859,7 @@ error:
|
|||
static struct file *
|
||||
v9fs_vfs_atomic_open(struct inode *dir, struct dentry *dentry,
|
||||
struct opendata *od, unsigned flags, umode_t mode,
|
||||
bool *created)
|
||||
int *opened)
|
||||
{
|
||||
int err;
|
||||
u32 perm;
|
||||
|
|
@ -918,7 +918,7 @@ v9fs_vfs_atomic_open(struct inode *dir, struct dentry *dentry,
|
|||
v9inode->writeback_fid = (void *) inode_fid;
|
||||
}
|
||||
mutex_unlock(&v9inode->v_mutex);
|
||||
filp = finish_open(od, dentry, generic_file_open);
|
||||
filp = finish_open(od, dentry, generic_file_open, opened);
|
||||
if (IS_ERR(filp)) {
|
||||
err = PTR_ERR(filp);
|
||||
goto error;
|
||||
|
|
@ -930,7 +930,7 @@ v9fs_vfs_atomic_open(struct inode *dir, struct dentry *dentry,
|
|||
v9fs_cache_inode_set_cookie(dentry->d_inode, filp);
|
||||
#endif
|
||||
|
||||
*created = true;
|
||||
*opened |= FILE_CREATED;
|
||||
out:
|
||||
dput(res);
|
||||
return filp;
|
||||
|
|
|
|||
|
|
@ -243,7 +243,7 @@ v9fs_vfs_create_dotl(struct inode *dir, struct dentry *dentry, umode_t omode,
|
|||
static struct file *
|
||||
v9fs_vfs_atomic_open_dotl(struct inode *dir, struct dentry *dentry,
|
||||
struct opendata *od, unsigned flags, umode_t omode,
|
||||
bool *created)
|
||||
int *opened)
|
||||
{
|
||||
int err = 0;
|
||||
gid_t gid;
|
||||
|
|
@ -357,7 +357,7 @@ v9fs_vfs_atomic_open_dotl(struct inode *dir, struct dentry *dentry,
|
|||
}
|
||||
mutex_unlock(&v9inode->v_mutex);
|
||||
/* Since we are opening a file, assign the open fid to the file */
|
||||
filp = finish_open(od, dentry, generic_file_open);
|
||||
filp = finish_open(od, dentry, generic_file_open, opened);
|
||||
if (IS_ERR(filp)) {
|
||||
err = PTR_ERR(filp);
|
||||
goto err_clunk_old_fid;
|
||||
|
|
@ -367,7 +367,7 @@ v9fs_vfs_atomic_open_dotl(struct inode *dir, struct dentry *dentry,
|
|||
if (v9ses->cache)
|
||||
v9fs_cache_inode_set_cookie(inode, filp);
|
||||
#endif
|
||||
*created = true;
|
||||
*opened |= FILE_CREATED;
|
||||
out:
|
||||
dput(res);
|
||||
return filp;
|
||||
|
|
|
|||
Loading…
Reference in a new issue