File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change 28
28
29
29
static void v9fs_upload_to_server (struct netfs_io_subrequest * subreq )
30
30
{
31
- struct inode * inode = subreq -> rreq -> inode ;
32
- struct v9fs_inode __maybe_unused * v9inode = V9FS_I (inode );
33
31
struct p9_fid * fid = subreq -> rreq -> netfs_priv ;
34
32
int err ;
35
33
@@ -98,15 +96,13 @@ static int v9fs_init_request(struct netfs_io_request *rreq, struct file *file)
98
96
99
97
if (file ) {
100
98
fid = file -> private_data ;
101
- BUG_ON (!fid );
99
+ if (!fid )
100
+ goto no_fid ;
102
101
p9_fid_get (fid );
103
102
} else {
104
103
fid = v9fs_fid_find_inode (rreq -> inode , writing , INVALID_UID , true);
105
- if (!fid ) {
106
- WARN_ONCE (1 , "folio expected an open fid inode->i_private=%p\n" ,
107
- rreq -> inode -> i_private );
108
- return - EINVAL ;
109
- }
104
+ if (!fid )
105
+ goto no_fid ;
110
106
}
111
107
112
108
/* we might need to read from a fid that was opened write-only
@@ -115,6 +111,11 @@ static int v9fs_init_request(struct netfs_io_request *rreq, struct file *file)
115
111
WARN_ON (rreq -> origin == NETFS_READ_FOR_WRITE && !(fid -> mode & P9_ORDWR ));
116
112
rreq -> netfs_priv = fid ;
117
113
return 0 ;
114
+
115
+ no_fid :
116
+ WARN_ONCE (1 , "folio expected an open fid inode->i_ino=%lx\n" ,
117
+ rreq -> inode -> i_ino );
118
+ return - EINVAL ;
118
119
}
119
120
120
121
/**
You can’t perform that action at this time.
0 commit comments