diff options
Diffstat (limited to 'fs/nfs/pnfs.h')
-rw-r--r-- | fs/nfs/pnfs.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h index e2612ea0cbed..9a994bc9899f 100644 --- a/fs/nfs/pnfs.h +++ b/fs/nfs/pnfs.h | |||
@@ -177,6 +177,16 @@ static inline int lo_fail_bit(u32 iomode) | |||
177 | NFS_LAYOUT_RW_FAILED : NFS_LAYOUT_RO_FAILED; | 177 | NFS_LAYOUT_RW_FAILED : NFS_LAYOUT_RO_FAILED; |
178 | } | 178 | } |
179 | 179 | ||
180 | static inline struct pnfs_layout_segment * | ||
181 | get_lseg(struct pnfs_layout_segment *lseg) | ||
182 | { | ||
183 | if (lseg) { | ||
184 | atomic_inc(&lseg->pls_refcount); | ||
185 | smp_mb__after_atomic_inc(); | ||
186 | } | ||
187 | return lseg; | ||
188 | } | ||
189 | |||
180 | /* Return true if a layout driver is being used for this mountpoint */ | 190 | /* Return true if a layout driver is being used for this mountpoint */ |
181 | static inline int pnfs_enabled_sb(struct nfs_server *nfss) | 191 | static inline int pnfs_enabled_sb(struct nfs_server *nfss) |
182 | { | 192 | { |
@@ -194,6 +204,16 @@ static inline void pnfs_destroy_layout(struct nfs_inode *nfsi) | |||
194 | } | 204 | } |
195 | 205 | ||
196 | static inline struct pnfs_layout_segment * | 206 | static inline struct pnfs_layout_segment * |
207 | get_lseg(struct pnfs_layout_segment *lseg) | ||
208 | { | ||
209 | return NULL; | ||
210 | } | ||
211 | |||
212 | static inline void put_lseg(struct pnfs_layout_segment *lseg) | ||
213 | { | ||
214 | } | ||
215 | |||
216 | static inline struct pnfs_layout_segment * | ||
197 | pnfs_update_layout(struct inode *ino, struct nfs_open_context *ctx, | 217 | pnfs_update_layout(struct inode *ino, struct nfs_open_context *ctx, |
198 | enum pnfs_iomode access_type) | 218 | enum pnfs_iomode access_type) |
199 | { | 219 | { |